? BUG 9.9.94 (context?)

Q&A's, tips, howto's
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

? BUG 9.9.94 (context?)

Post by newdep »

Hi Lutz,

I can remember this previously worked ->

(map context? (symbols))

but now that does not return anything anymore..
(i mean all 'nil)


neighter does

>(filter context? (symbols))
()


Is this new? I would expect these to return at least "true" for MAIN..
-- (define? (Cornflakes))

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

yes it still works (50%) ;-)


(filter context? (map eval (symbols 'MAIN))))


but I was confused by the use of (map protected? (symbols))
which does return a list of nil / true )
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

'context?' takes a context evaluated from a symbol, while 'protected?' takes a symbol. Its like:

Code: Select all

> (context? 'MAIN)
nil
> (context? MAIN)
true

Locked