I have a library called FnParse, and I'm wondering if I should rewrite
it using monads. (You can see FnParse's documentation at <http://
wiki.github.com/joshua-choi/fnparse> and its implementation at <http://
github.com/joshua-choi/fnparse/blob/
065cc97da4c368e10d901edacbe885bd3a8443a1/src/name/choi/joshua/
fnparse.clj>.) It implements a bunch of "rule functions" that consume
tokens:
  Sequence of tokens -> [a new product from the consumed tokens,
remaining tokens]

Right now, my basic rule-combining functions use loops over the rules
to be combined.

Now, I've been reading the Clojure monad introductions that have been
popping up around, and some things that struck me as interesting were
that parsers could be elegantly implemented using monads, and that
monads were modular and combinable.

I don't know enough about monads, though, to know if it'd be worth
trying to rewrite my library in it. It seems like if do that, people
may be able to directly use the new monads in their own monads, but
I'm not sure. My library is working fine as of now—would it be worth
it to add monads to it?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to