red / REP

Red Enhancement Process
BSD 3-Clause "New" or "Revised" License
10 stars 4 forks source link

WISH: currency-of reflector for money! values #69

Closed meijeru closed 4 years ago

meijeru commented 4 years ago

Operations on money! values need to be able to take account of the currency feature. Therefore one needs a reflector, call it currency-of. When the currency is indicated on the value, this will yield a word! value, else none.

currency-of USD$1.07 => USD
currency-of $0.00 => none
meijeru commented 4 years ago

In the light of the continuing discussion on #68, an alternative for my wish would be an accessor, call it /currency, thus

a: USD$1.07
a/currency => USD
9214 commented 4 years ago

Can be closed.