Hacker News new | ask | show | jobs
by coldtea 3397 days ago
A, yes. In that case you could expose all the functions you want in advance, in some map that's accessible by (string) name.
1 comments

    // Static
    
    err = rootEnv.DefineForeignProcedure("sprintf", fmt.Sprintf)

    # Runtime

    (let x 2
         (sprintf "%d cubed is %d"
                  x
                  (pow x 3)))

    => "2 cubed is 8"
Yep, that's what I was talking about.