I'm trying to write a spelling 'standardizer' for a language that has no standardized spelling. There are about 25 spelling rules, and a few more may be added. . The input words, streamed one at a time from a text file, go through these rules, and may change if conditions are met. To take English examples, "wouldn't" would be converted to "would", "labour" to "labor" (assuming a particular spelling standard), "criticise" to "criticize", "prolog" to "prologue". My knee- jerk reaction is to implement the rules as individual functions (what a joy to do this in Clojure!). The functions may be called in different orders depending on, say, the number of syllables of the input word).
As suggested by Masanori, I read up on Clojure state -- and what a revelation that was. I understood it enough to say I don't understand it, because, my initial blockheaded reaction was, so how's sending back a value different from the Clojure way, since the value sent back is the state of the identify x at that point in time. I will try Laurent's suggestion. Thanks for the enlightenment! tuba On Jul 28, 5:03 am, Thorsten Wilms <t...@freenet.de> wrote: > On 07/28/2011 11:29 AM, Tuba Lambanog wrote: > > > I'm trying to pass a variable through a series of functions, which may > > change the value of the variable. However, the next function in line > > uses the original value, rather than the changed value. Here's a > > pseudo-code of what I'm doing. > > I think you should provide more context. Why, if that is the case at > all, do you want to pass an argument through functions that do not work > with it? > > How many arguments does each fn in the line take (and what do they > evaluate to)? > > Is it a fixed or a variable number of functions? > > > Perhaps a sub-forum for beginners? Kind of embarrassing to ask here > > questions that are so newbie-ish. > > Really no reason to feel embarrassed and I doubt the experts here would > like to monitor an additional space ... > > -- > Thorsten Wilms > > thorwil's design for free software:http://thorwil.wordpress.com/ -- 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 Note that posts from new members are moderated - please be patient with your first post. 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