We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently all > lines must be expressions. This is awkward when one wishes to define a function for use in doctests, as in sanctuary-js/sanctuary#316:
>
//. > global.fib = function fib(n) { //. . return n <= 1 ? n : fib(n - 2) + fib(n - 1); //. . } //. fib //. //. > S.fromMaybe_(() => fib(30), S.Just(1000000)) //. 1000000 //. //. > S.fromMaybe_(() => fib(30), S.Nothing) //. 832040
It would be nice to be able to use a function declaration (a statement) instead:
//. > function fib(n) { return n <= 1 ? n : fib(n - 2) + fib(n - 1); } //. //. > S.fromMaybe_(() => fib(30), S.Just(1000000)) //. 1000000 //. //. > S.fromMaybe_(() => fib(30), S.Nothing) //. 832040
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently all
>
lines must be expressions. This is awkward when one wishes to define a function for use in doctests, as in sanctuary-js/sanctuary#316:It would be nice to be able to use a function declaration (a statement) instead:
The text was updated successfully, but these errors were encountered: