ClojureScript

Implement ratios

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Clojure.java contains support for Ratio types. It would be nice to have them in Clojurescript as well, but as far as I can tell this would be new development (please comment if I'm wrong). That is, there is no implementation of Ratio types in GClosure so this feature would need to be implemented from the ground up. In additional to the Ratio type, the following corresponding functions would also need implementations:

  • `ratio?`
  • `numerator`
  • `denominator`
  • `rationalize`

Plus the ratio type would need to be rolled into the existing mathematical frameworkings.

Imported from github issue #66

Activity

Hide
David Nolen added a comment -

What approach do you envision here given that we can't reliably detect integers in JavaScript?

Show
David Nolen added a comment - What approach do you envision here given that we can't reliably detect integers in JavaScript?
Hide
Brandon Bloom added a comment -

See CLJS-370 for more reliable integer detection

Show
Brandon Bloom added a comment - See CLJS-370 for more reliable integer detection

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: