top | item 20285075

(no title)

mpcjanssen | 6 years ago

This could equally well be a function which takes a string and a seed and returns the hash.

The more concrete the type signatures become the less they become documenting.

A signature of a -> a defines the id function because the type is so generic. A function of String->String can do pretty much anything.

discuss

order

dodobirdlord|6 years ago

But that's exactly my point. Why would something that is a randomization seed have type "String"? Why would a hash have type "String"? Why not type Seed and type Hash?

A type signature of Seed -> String -> Hash is pretty enlightening!