requirebin sketch
✓ Published0🌍 Public
HHypercubed
Last edited Feb 6, 2016
Created on Feb 6, 2016
This example uses the `typed-function` library to define a polymorphic `fib` function with custom types for zero and one, then logs the first 20 Fibonacci numbers. The code adds type tests for exact numeric values and dispatches based on argument type, demonstrating dynamic function overloading in JavaScript. The output is generated by the Node.js `console.log` call, producing the sequence in the browser console via RequireBin.
AI-generated description