-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
The IsEven built-in function currently takes 1 parameter (the number) and returns the probability as a number from 1 to 100 that the number is even.
There should be a 2nd parameter which specifies the algorithm for deciding if a number is even. For example, a value of guess would use the current behaviour, ask would ask the user if the value is an even number (requesting y/n on stdout), table would use a lookup table of even numbers, etc...
Contributions to add these functionalities are welcome. Comments with Go source code on this thread as well as pull requests for integers.go will be accepted.