shriram / smol

The SMoL (Standard Model of Languages) Family of Languages
15 stars 3 forks source link

cons should not accept a non-list as its second argument #10

Closed LuKuangChen closed 2 years ago

LuKuangChen commented 2 years ago

KC: Some students think (cons (list 1 2) 3) should error, which kind of makes sense because we wrote in smol/hof doc that cons is a "list generator". Do you think we should fix cons such that it checks its second parameter?

SK: Yes! I would say cons making non-lists is definitely a Lisp-ism, not a "Standard Model"-ism.

KC: Agree!