Alan Manuel Gloria: > The main reason why the above is attractive to me (despite the cond > hiding there) is because it looks and feels a whole lot like > Haskellian: > > map1 f as > | null as = [] > | pair as = (:) > (f $ car as) > (map f $ cdr as) > | otherwise = error "attempt to map a non-list"
Interesting. It certainly *does* look & feel similar. I'm still not convinced that *I* would do it, but with that logic, it does seem less like abuse. I speculated: > > If that's a common case, perhaps in spec version 0.4 we should take: > > left-hand-side-on-same-line $ right-hand-side-with-subblocks > > and redefine it as: > > \\ > > ! \\ left-hand-side-on-same-line > > ! \\ right-hand-side-with-subblocks > > bleah. I much prefer to be able to use "map f $ cdr as" than "pred? x > $ foo bar". That's the key trade-off. Fair enough. > Personally, I think that it's generally better to have shorter > predicate code (stuff that's easy to express in n-expr) and a longer > condition. Okay, that's reasonable. Idea raised, discarded. I still think we ought to map "EMPTY $ RHS" to "(RHS)". It's useful for single-variable "let" and Scheme "do" loops. Since we don't even *allow* it right now, it's even backward-compatible :-). Good luck on BiwaScheme. --- David A. Wheeler ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss