Better HN
topnewbestaskshowjobs
Log inSign up

npryce

3 karma · joined Dec 19, 2013 (12y ago) · 1 submissions

Submissions

comment 12y ago · link · parent

J has a similar feature: when applied to an empty array, /+ returns 0 and /* returns 1.

J doesn't have user-defined types. In a language with user-defined types, you would probably have to declare which operations are monoids.