I also see evidence it's changed or changing. Is this page:
The way it works going forward?
Maybe I'm wrong about this, but my understanding is that many
components will be taking one sequence and returning a new lazy
sequence?
So I'm working through a simple function that takes a text file and
returns it as a sequence, one character at a time.
Then a transformation function (not using the framework yet) that
turns the char into moorse code, and then finally one that prints.
Then when I'm comfortable with that, I'll write these out as
components and the character will come in as {:char "c"} and be
transformed as {:char "c" :morse "_._."}.
When I'm comfortable with that, I'll be comfortable enough to write
real functions to do transformations and have all kinds of substantive
questions.
- Serge
Well I'll go through the book again.
Once that's done I have a bunch of components that I think need
writing early on.
The first is a sorted? component which would take an order (ascending
or descending) and a keyword and tell you if the data is sorted or
not.
I don't think anyone will use this by itself, but I can well imagine
wanting to use this during the development phase of a project.
This did get me thinking about output though. I know we've talked
about functions only having one output. I think we may want to think a
little about that... While I agree 100% that functions should only
return a single value, I think data to stdout or stderr might make
sense for use in debugging. I think even Yahoo Pipes does this with a
little console on the screen, and that marries somewhat into what
Conrad was saying. I don't think you want this as part of your
production project, but you'll want to be able to figure some things
out during the development process.
So I'm going to take a crack at this lazy-seq. Any help would be appreciated.
- Serge