unicalc: type of quantities
5 meter/sec2
[M , N , D]
multiplier, numerator, denominator
[5, [meter], [sec,sec]]
reduce (1 argument)
[5, [meter,sec], [sec,sec]]
[5, [meter], [sec]]
Assume lists are sorted
Use < ==
to do reduction
[kg, m, m, sec]
[m, sec, sec]
[kg, m]
[ sec]
make_num
([A|L],
[B|M]) Þ A<B?
[A|reduce( )]
make_denom
multiply([M1,N1,D1],[M2,N2,D2])
Þ [ , , ]
Quantity: Num x U* x U*