disco-lang / disco

Functional teaching language for use in a discrete mathematics course
Other
163 stars 23 forks source link

Add a standard library module defining common function properties #166

Open byorgey opened 5 years ago

byorgey commented 5 years ago

Associative, commutative, idempotent, identity etc. These can be referenced in properties, and then in order to typecheck applications of reduce we can look for them somehow?

byorgey commented 4 years ago

Once we have Prop (#217) and the ability to specify qualified polymorphic types (#179) we can put these in a library.

byorgey commented 4 years ago

Critical since we really need these in order for containers to work properly.

byorgey commented 2 years ago

Meh, downgrading to 'moderate' importance. From a theoretical point of view, yes, this is important to get reduce to behave correctly. But at this point it's not something students will ever really run into.

byorgey commented 2 years ago

Another possibility would be to just have these as built in primitives; but I don't like that because I want students to know the definition of these properties, and being able to actually see the definition instead of having them work by built-in magic would reinforce that.

byorgey commented 1 year ago

Still blocked on #179 .