Arc Forumnew | comments | leaders | submitlogin
Arc addition: ado1
2 points by akkartik 3666 days ago | discuss
I recently found myself wishing for this. I wanted to print the value being bound in:

  (let (request-line . header-lines) read-header.in
    ...)
After https://github.com/arclanguage/anarki/commit/83829a8d38, I can:

  (let (request-line . header-lines) (ado1 read-header.in (map ero it))
    ...)
(I can't prn because stdout is in use. And ero doesn't return its first arg.)

After I came up with the idea I noticed that anarki already has a very haskell-like ado, so this rounds out the set.

(I've been making a bunch of changes recently to srv.arc in response to some email requests. If you haven't looked at it lately, it should hopefully be much better organized. Compare https://github.com/arclanguage/anarki/blob/5931ba361b/lib/srv.arc and https://github.com/arclanguage/anarki/blob/a30d51ce87/lib/srv.arc)