How does one detect a change in a doseq?
I'm trying to do what data processing people would call a control break in
a report. I'm printing account + fund names. My data is sorted by
account, so each row has a new fund, and accounts change less frequently.
I'd like to print a separator line when account changes. In a procedural
language, I'd set up an old-account variable, and I'd print the separator
line when account != old-account.
(doseq [h list-of-account-fund-pairs]
(let [account (first h)
fund (second h)
* (if changed-account)*
(println "-----------")
(println account fund)
Thanks!
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.