If in-effect were a macro, you'd avoid the ugly lambda ().
On Aug 3, 2012, at 9:58 AM, Jens Axel Søgaard wrote:
> 2012/8/3 Matthew Flatt :
>> More precisely, evaluation of the `in-value' call is evaluated once,
>> printing a dot and returning a sequence that contains #.
>
> Would it make sens
2012/8/3 Matthew Flatt :
> More precisely, evaluation of the `in-value' call is evaluated once,
> printing a dot and returning a sequence that contains #.
Would it make sense to include an in-effect ?
https://github.com/soegaard/this-and-that/blob/master/heart-beat/in-effect.rkt
--
Jens Axel Sø
At Fri, 03 Aug 2012 14:11:20 +0100, Tim Brown wrote:
>
> (for ([j (in-range 10)] [i (in-cycle (in-range 3) (in-value (displayln
> ".")))]) (displayln i))
> stdout: ".\n0\n1\n2\n#\n0\n1\n2\n#\n0\n1\n"
>
> Which suggests that the in-value is evaluated once printing a dot and
> returning # -- the
I'm trying to create a long-running for loop; and would like a
"heart beat" mechanism to show progress.
I've tried to use:
(for/sum
([i (in-range 100)]
[pulse (in-cycle (in-range 999) (in-value (displayln ".")))]
)
i)
Which gives me:
Value: 4950
stdout: ".\n"
[I think rudybot wa
4 matches
Mail list logo