Clojure

Evaling ((fn [do] do) 1) returns nil while ((fn [do] do do) 1) returns 1

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Patch:
    Code and Test

Description

user=> ((fn [do] do) 1)
nil

user=> ((fn [do] (do do)) 1)
1

user=> ((fn [] do))
nil

user=> ((fn [] do do))
CompilerException java.lang.RuntimeException: Unable to resolve symbol: do in this context, compiling:(NO_SOURCE_PATH:0:0)

Activity

Nicola Mometto made changes -
Field Original Value New Value
Attachment 0001-Create-a-DoExpr.Parser-class-that-delegates-to-BodyE.patch [ 12025 ]
Alex Miller made changes -
Labels compiler

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: