Hacker News new | ask | show | jobs
by draegtun 1436 days ago
And Rebol.

Arguments sent as `[blocks]` are always unevaluated but you can also explictly set a function argument to not be evaluated...

    f: func ['a] [
        print ["you gave me: " a]
        print ["and this is what it evaluates to:" get a]
    ]

    val: "hi!"

    f val
Outputs:

  you gave me:  val
  and this is what it evaluates to: hi!
And the function body is mutable...

    f: func [a] [
        print a
    ]

    f 10   ;; => 10

    append second :f [* 2]

    f 10   ;; => 20