lucasta has quit [Remote host closed the connection]
johnjaye has quit [Quit: WeeChat 4.0.0-dev]
shawnw has joined #racket
notzmv has quit [Ping timeout: 265 seconds]
notzmv has joined #racket
<mister_m>
can I do something like `foldl` with a string?
<mister_m>
do I need to first convert the string to a list of characters in order to `foldl` the items? Is there a `foldl` that works with any sequence (such as a string)?
skapata has quit [Remote host closed the connection]
scubagear has quit [Remote host closed the connection]
scubagear has joined #racket
scubagear has quit [Remote host closed the connection]
scubagear has joined #racket
mwnaylor has quit [Ping timeout: 250 seconds]
jeosol has quit [Quit: Client closed]
pharonix71 has quit [Ping timeout: 240 seconds]
pharonix71 has joined #racket
GreaseMonkey has quit [Quit: No Ping reply in 180 seconds.]
Origin has joined #racket
<mister_m>
thanks
<mister_m>
I feel like for/fold is probably the way to go here as I don't need to require anything
shawnw has quit [Ping timeout: 276 seconds]
jeosol has joined #racket
skapata has joined #racket
Putonlalla has quit [Ping timeout: 256 seconds]
FreeFull has joined #racket
skapata has quit [Remote host closed the connection]
dhil has joined #racket
scubagear has quit [Read error: Connection reset by peer]
scubagear has joined #racket
<mister_m>
Racket has `apply`: `(apply f '(1 2 3))`, but does it have anything similar to common lisp's `FUNCALL`: `(funcall f 1 2 3)` ?
notzmv has quit [Ping timeout: 265 seconds]
<samth>
mister_m: there is not a built-in function that does that, but it is (lambda (f . args) (apply f args))
<mister_m>
thanks; I'll stick with apply - I don't really have to bend over backwards to make a list
Tuplanolla has joined #racket
dhil has quit [Ping timeout: 256 seconds]
mwnaylor has joined #racket
jboy has quit [Remote host closed the connection]
avocadoist has joined #racket
jboy has joined #racket
sagax has joined #racket
GreaseMonkey has joined #racket
sagax has quit [Read error: Connection reset by peer]
skapata has joined #racket
<mister_m>
Sort of fumbled by way through this trying to use `for/fold` - does anyone have ideas about how this could be made more concise or idiomatic in racket? http://pasterack.org/pastes/59103 Is there a way to break out of the for/fold in the body of the loop rather than using #:unless ? I repeat my stop predicate in those places
<mister_m>
also sort of discarding the acc accumulator - maybe there is a different version of `fold/x` that I want?
<mister_m>
writing just a recursive function and returning when appropriate seems better here