A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
this week in the
Need help with basics of ML
Joined: Nov 03, 2013
Nov 03, 2013 18:43:33
I need to first generate an infinite list containing fibonacci sequence.
This is what i did.
-datatype 'a inflist = NIL |CONS of 'a * (unit -> 'a inflist); -fun fib a b=CONS(a, fn() => fib b (a+b)); val fib=fn : int-> int -> int inflist
Now i need to create an infinite list that has the entire fibonacci sequence.
And i am not able to understand how to do that.
I agree. Here's the link:
subject: Need help with basics of ML
Online Java Editor/Compiler?
What does recursion code hurt ?
Java Assignment Problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015