Re: [stack] sweetening concatenative syntax
"William Tanksley, Jr" <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
John Nowak <[email protected]> wrote: > William Tanksley, Jr wrote: > I explained what 'unlist' does in an earlier email. You may've missed > it. Sorry, sure did. > What 'unlist' does is take three arguments. The first is a list. The > second is a function that says what to do if that list is null. The > the third is a function that acts on the list after is has been > unconsed if it is not null. The 'unlist' function is called a sum > deconstructor as lists are sum types (they're either a "null" or a > "cons"). Cool! So 'unlist' does exactly what FunForth does (well, it's typesafe, unlike FunForth). I suppose I don't get why lambdas help with that, then. I assumed you were talking about pattern matching, since lambdas there could fit into the pattern, therefore helping you notate what is being extracted. But if you're only disassembling the parts of a structure, I don't see why you have to give the parts names. > - John -Wm