Skip to content

clojure.core/get ought to support an optional 3rd arg: not-found (default value) #86

Open
@phrohdoh

Description

@phrohdoh

API for clojure.core/get - Clojure v1.10.2 (stable)

(get map key)
(get map key not-found)
for src in '(get,{},:k)#_nil' '(get,{:k,:v},:k)#_:v' '(get,{},:k,:not-found)#_:not-found' '(get,{:k,:v},:k,:not-found)#_:v'; do clj -e "(prn,$src)"; done
nil
:v
:not-found
:v

ClojureRS 1a1681f supports only

(get map key)
for src in '(get,{},:k)' '(get,{:k,:v},:k)' '(get,{},:k,:not-found)' '(get,{:k,:v},:k,:not-found)'; do cargo run -- -e "$src"; done
nil
:v
#Condition["Wrong number of arguments given to function (Given: 3, Expected: 2)"]
#Condition["Wrong number of arguments given to function (Given: 3, Expected: 2)"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions