[<<][staapl][>>][..]
Sat Aug 11 15:21:18 CEST 2007
wordlist search path
i need to change the 'find' macros so they accept multiple paths..
one think i'm wondering about is how 'force' is implemented.. somehow
i suspect that the thunk is not erased... it probably is..
found it:
(define(force p)
(unless(promise? p)
(raise-type-error 'force \promise\ p))
(let((v(promise-p p)))
(if(procedure? v)
(let((v(call-with-values v list)))
(when(procedure?(promise-p p))
(set-promise-p! p v))
(apply values(promise-p p)))
(apply values v))))
thunk is erased. the only thing to optimize is to not use the values
stuff, but a single return value. probably not worth it.
Haha, something i didn't see at first there: the p is either a
procedure or a list, so i can't make a single atom of it, because it
could be a procedure :)
another trick:
creating the '<language>:' macro at the spot where the '(language)'
dictionary is created and populated with primitives uses the module
dependency system to somehow enforce dependencies on namespaces, which
are not checked.
[Reply][About]
[<<][staapl][>>][..]