Of course. Eg
delayed1 = function()
print("evaluating!\n") 42
end force(f::Function) = f() force(delayed1)
You just need the macros for the syntactic sugar, bookkeeping,
etc.
Any intermediate Scheme textbook provides a lot of examples on how
to do these things with closures.
I am curious why you want to do it without macros, though; you
just get a lot of boilerplate code. BTW, there aren't a lot of
macros in Lazy.jl either.
Best,
Tamas
On Fri, Jul 17 2015, Mark S <[email protected]> wrote:
Hello,
I am interested in the delayed evaluation implementations like
Lazy.jl (one-more-minute) and LazySequences.jl (dcjones). Both
of these use Julia's macros facilities.
Is it possible to implement delayed evaluation without using
macros?
Thanks for any leads or good references on this.
Mark