Wither Self

Joe Armstrong joe@REDACTED
Mon Sep 8 14:18:57 CEST 2003

    Shouldn't there be a Self in funs?

    IMHO writing:

	Fac = fun(0) -> 1;	
		 (N) -> N*Self(N-1) end
    is just teensy weensy bit simpler than:

	Fact = fun(X) -> 
            G = fun(0, F)  -> 1; 
                   (N, F) -> N*F(N-1,F) 
            G(X, G) 
    I don't really know my way around the code base since it's been
reorganised - it should be just a quick hack in the linter and 
lambda lifter - but what these are called today I have no idea :-)


More information about the erlang-questions mailing list