I just came back to say I just looked and didn't realise I had to click P16
to see that function....
Thanks once again.
Just goes to show...however idiot-proof you make your system....
someone will just invent a better idiot :)
On 6 February 2017 at 22:51, dean <deangwillia...@gmail.com> wrote:
> Oh gosh...I missed that completely...Thanks Lindsay...That explains
> I'm really pleased you told me that because drop looks like a really
> useful function.
> Best Regards
> On 6 February 2017 at 22:27, Lindsay John Lawrence <
> lawrence.lindsayj...@gmail.com> wrote:
>> P16 (**) Drop every N’th element from a list.
>> (de drop (Lst N)
>> (for (I . X) Lst
>> (unless (=0 (% I N))
>> (link X) ) ) ) )
>> : (drop ’(a b c d e f g h i k) 3)
>> -> (a b d e g h k)
>> 'drop' is the function given as a solution to the problem.
>> On Mon, Feb 6, 2017 at 1:24 PM, dean <deangwillia...@gmail.com> wrote:
>>> Hi Alex
>>> : (filter prog2 (1 a 2 b 3 c) '(T NIL .))
>>> -> (1 2 3)
>>> : (filter prog2 (1 a 2 b 3 c) '(NIL T .))
>>> -> (a b c)
>>> Yes the above is exactly what I'm after.
>>> I copied this drop example straight from ninety nine..
>>> ? P16 (**) Drop every N'th element from a list.
>>> : (drop '(a b c d e f g h i k) 3)
>>> !? (drop '(a b c d e f g h i k) 3)
>>> drop -- Undefined
>>> I'm not sure why I'm getting "undefined".
>>> I'm using the pil in my picolisp directory.... which looks like this...