Ah. I missed the distinction between 'any and 'lst. As in... (fish 'fun 'any) -> lst
vs say... (filter 'fun 'lst ..) -> lst Thank you. /Lindsay On Wed, Feb 22, 2017 at 11:00 PM, Alexander Burger <[email protected]> wrote: > Hi Lindsay, > > > (de odd? (X) (bit? 1 X) ) > > ... > > : (odd? 1) -> 1 > > : (odd? 2) -> NIL > > ... > > : (fish odd? (1 2 3)) > > !? (bit? 1 X) > > (1 2 3) -- Number expected > > This happens because 'fish' applies the function to *all* elements of its > second > argument, not just the atomic ones. > > > > (de odd? (X) (and (num? X) (bit? 1 X)) ) > > -> odd? > > > > Now it works with fish... > > > > : (fish odd? (1 2 3)) > > -> (1 3) > > Right. As you now check for 'num?', 'bit?' is not called with a list > argument > which it can't handle. > > ♪♫ Alex > -- > UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe >
