Re: [Factor-talk] deep-cleave-quots

2008-11-23 Thread Slava Pestov
On Sun, Nov 23, 2008 at 2:19 AM, Eduardo Cavazos [EMAIL PROTECTED] wrote: :: [deep-cleave-quots] ( SEQ -- quot ) [let | QUOTS [ SEQ [ quotation? ] deep-filter ] RECIPE [ SEQ [ dup quotation? [ drop , ] [ ] if ] deep-map] | [ QUOTS cleave RECIPE bake ] ]

[Factor-talk] deep-cleave-quots

2008-11-23 Thread Jean-François Bigot
Hi, When I try to do something in Factor: 1. I look in libraries if a word do what I want (not always simple, and sometimes really hard) 2. I try to do it by myself if it is easy 3. I look at examples in extra vocabs and try to understand what is done (a great hand parsing job !) When I

Re: [Factor-talk] deep-cleave-quots

2008-11-23 Thread Eduardo Cavazos
Slava Pestov wrote: Here is my version, lest the peanut gallery think that our only took for dealing with complexity is locals: MACRO: deep-cleave-quots ( seq -- quot ) [ [ quotation? ] deep-filter ] [ [ dup quotation? [ drop , ] when ] deep-map ] bi '[ _ cleave _ bake ] ;

Re: [Factor-talk] deep-cleave-quots

2008-11-23 Thread Slava Pestov
On Sun, Nov 23, 2008 at 7:36 AM, Jean-François Bigot [EMAIL PROTECTED] wrote: is easy to cross for a newbie. Slava's solution is more readable for me, but the most difficult point is to discover that words like deep-map and deep-filter exist. Hi, The problem here is that many Factor libraries