Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about lazy-sequences

Read more about lazy-sequences

python (65.2k questions)

javascript (44.3k questions)

reactjs (22.7k questions)

java (20.8k questions)

c# (17.4k questions)

html (16.3k questions)

r (13.7k questions)

android (13k questions)

Questions - lazy-sequences

How to define a infinite Lazy List using a given function or property in Scala?

I recently was seeing an advanced Scala course in Rock the JVM and, in one lesson, Daniel purposed to create a set using propertys (functions going from A to Boolean), the implementation of this Set c...
test-img

Gabriel Santana Paredes

scala

functional-programming

lazy-evaluation

computed-properties

lazy-sequences

Votes: 0

Answers: 1

Latest Answer

Well, there is no "LazyMap" out of the box, but it is rather trivial to just roll your own. Your comments sound like you already know how to compute Fibonacci with a LazyList, from there, yo...
test-img

Dima

How can I create a type in order to accommodate the return value of my Ocaml function?

I am trying to implement a lazy fibonacci generator in Ocaml as shown below: (* fib's helper *) let rec fibhlpr n = if n == 0 then 0 else if n == 1 then 1 else fibhlpr (n-1) + fibhlpr (n-2);; (* laz...
test-img

boring_pencil

functional-programming

ocaml

lazy-sequences

Votes: 0

Answers: 4

Latest Answer

If you want to define a lazy sequence, you can use the built-in sequence type constructor Seq.t let rec gen_fib a b () = Seq.Cons(a, gen_fib b (a+b)) let fib () = gen_fib 0 1 () This implementation a...
test-img

octachron

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved