[Jprogramming] more fork examples
Don Guinn
donguinn at gmail.com
Mon Jan 20 19:26:48 UTC 2014
In an algebra course in college we formally rebuilt arithmetic from very
basics. We had to define counting number addition in terms of repeated
incrementing. Like this in J:
increment =: >:
increment 3
4
plus =: increment ^:
3 plus 4
7
And then we went on to define decrement in terms of undoing an increment.
decrement =: increment ^:_1
decrement 5
4
Which led to defining subtraction which led to defining zero and negative
numbers. And so on for multiplication and division which then led to
rational numbers etc.
But I think anyone who had to suffer through redefining mathematics
formally would appreciate these uses of power.
More information about the Programming
mailing list