On Wednesday, July 29, 2015 at 8:17:06 AM UTC-7, Michael Titke wrote:
> (define (apply-or well-formed-list)
>
> (foldl {lambda (a b) (or a b)}
>
> #f
>
> well-formed-list))
>
> (define (apply-and well-formed-list)
>
> (foldl {lambda (a b) (and a b)
On Sat, Aug 18, 2012 at 10:51 PM, Asumu Takikawa wrote:
> On 2012-08-18 21:59:28 -0700, Ian Tegebo wrote:
>> (take k (in-generator (infinite-generator (yield (random n)
>>
>> where k and n are positive integers, k>
>> Unfortunately, 'in-generator'
think this addresses the
larger issue with large/infinite streams/generators, I'll certainly
use this trick for small lists.
> On Aug 18, 2012, at 10:59 PM, Ian Tegebo wrote:
>
>> (define (call-n-times f n)
>>(define (helper f n lst)
>> (if (< n 1)
>
a b); other arguments were: 1
My current approach aside, is there a better way?
Here's my workaround,
(define (call-n-times f n)
(define (helper f n lst)
(if (< n 1)
lst
(helper f (- n 1) (cons (f) lst
(helper f n '()))
(define (take-randoms k n)
gt; https://github.com/pb82/sdl4racket
>
> On 11.08.2012 04:43, Ian Tegebo wrote:
>>
>> I'm playing around with an FFI for SDL. Rather than slog through all
>> the headers by hand, I went looking for some code that may do a bit of
>> the parsing and translation.
"__extension__=" -D "__attribute__(ARGS)=" -E
/usr/include/SDL/SDL.h | sed '/^\#/d' | indent -st -i2 |grep -vE
'^[[:space:]]*$' > sdl.h
Has anyone else gone down this road before? Also, Besides Eli's
paper, any general advice for Racket FFIs?
Than
ist str)
>
> This looks rather clumsy to me. [...] Any suggestions?
So far, no one has suggested a regexp. Why not,
(define (all-lower-case? s) (not (regexp-match? #rx"[A-Z]" s)))
--
Ian Tegebo
Racket Users list:
http://lists.racket-lang.org/users
On Sun, Jul 1, 2012 at 2:05 PM, Robby Findler
wrote:
> On Sun, Jul 1, 2012 at 3:50 PM, Jay McCarthy wrote:
>> On Sun, Jul 1, 2012 at 1:27 AM, Ian Tegebo wrote:
>>> Is racket-lang.org written in Racket?
>>
>> It is statically generated by this code:
>>
>>
Is racket-lang.org written in Racket? Also, where is the source for
planet.racket-lang.org?
--
Ian Tegebo
Racket Users list:
http://lists.racket-lang.org/users
. That aside, are there any papers that introduce
"inspectors"?
--
Ian Tegebo
Racket Users list:
http://lists.racket-lang.org/users
10 matches
Mail list logo