orangeduck / BuildYourOwnLisp

Learn C and build your own programming language in under 1000 lines of code!
http://www.buildyourownlisp.com/
Other
2.84k stars 392 forks source link

Average expression for extra points #148

Closed MozarellaMan closed 3 years ago

MozarellaMan commented 3 years ago

I think a cool addition to the extra points part would be to implement an avg keyword. Such that:

avg 2 4 6 12 => 6

I'd like to suggest this mainly because I've been trying to do it and have been running into segmentation faults left and right... Would be nice if lots of other people were trying it as well so I could get some help getting it working on my repo 😅

orangeduck commented 3 years ago

Nice idea :)