kongware / scriptum

Functional Programming Unorthodoxly Adjusted to Client-/Server-side Javascript
MIT License
383 stars 21 forks source link

Homogeneous check fails for empty collections #334

Closed ivenmarquardt closed 3 years ago

ivenmarquardt commented 3 years ago

The following imperative array doesn't type check unexpectedly: [["uffix"], ["ffix"], ["fix"], ["ix"], ["x"], []]

The problem is the empty array, which has type [a]. For the given example a should unify to String, but the homogeneous check doesn't conduct unification.