Arc Forumnew | comments | leaders | submitlogin
2 points by mdemare 6173 days ago | link | parent

List monad in Arc:

    (def list-monad (seq . fns)
      (each f fns 
        (= seq (apply join (map f seq))))
        seq)

    (list-monad '(1 2 3 4 5) 
      [list (- _ 1) _] 
      [list (* 2 _) _])