sanctuary-js / sanctuary-def

Run-time type system for JavaScript
MIT License
293 stars 23 forks source link

types: rename Pair type constructor and define Array0 and Array1 #182

Closed davidchambers closed 6 years ago

davidchambers commented 6 years ago

Commit message:

Pair is a misleading name because a value of type Pair a b should support operations such as map :: (b -> c) -> Pair a b -> Pair a c and bimap :: (a -> c) -> (b -> d) -> Pair a b -> Pair c d.

The Sanctuary ecosystem will soon have a real Pair type. Let's free the name for use by that type. :)

Avaq commented 6 years ago

Are we not going to use Tuple as a name?

davidchambers commented 6 years ago

Are we not going to use Tuple as a name?

What do you have in mind, exactly?

davidchambers commented 6 years ago

The more I think about this change the more I like it. :)