Prelude In Raku there's a notion called infinite list AKA lazy list which is defined and used like: I'd like to implement this sort of thing in Co ...
Prelude In Raku there's a notion called infinite list AKA lazy list which is defined and used like: I'd like to implement this sort of thing in Co ...
So I watched a video (14:30) about the new c++ 20 features and wanted to try out infinite ranges. I wrote this code: #include <iostream> #incl ...
A simple problem in R using the For loop to compute partial sums of an infinite sequence is running into an error. Error in b[t] <- b[t - 1] ...
Consider one of these implementations of a function to remove consecutive duplicates from a list: They both work as expected on both finite and i ...
I have a project in scheme in which I need to implement an infinite sequence of numbers. I can't use any scheme-built-in complex functions, and I just ...
I'm trying to create a generator that prints out a specified infinite sequence. Currently, I have the following code: Which then gives me: I'm n ...
I want to use the datatype sequence that is defined as follows: which has to option to iterate over functions backward and forward: and i defin ...
So I am making a tic tac toe game with user friendly GUI interface. I have almost completed the game but there seems to be a problem with my checkWin ...
Is there an analog of Python's itertools.count in Racket? I want to create an infinite stream of evenly spaced numbers. in-naturals is similar to what ...
I have a piece of code which would code as follows: Where the condition will be true for a few elements and then become false for all remaining one ...
I am trying to generate a list of infinite numbers So far I got However I am getting the error I do not understand the error since evenise ta ...
I have two things for the desired infinite list: its first element and function which generates the next element What's the best (most idiomatic ...
Given a starting number, imagine an infinite sequence of its successive halves. (Ignore any numerical instabilities inherent in double.) Can this ...
I am trying to use a ListBox to display a possibly infinite list of options to a user. Currently, I am simply cutting off the list at an arbitrary poi ...
I am trying to solve Project Euler problem #12: The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle n ...
I have to code a function that receives a sequence (finite or infinite) and returns an identical sequence with the only difference that if an excepti ...
I want to get captures using regex on a string that could contain an indefinite amount of numbers. My intuition lead me to do "/\.getnumbers (\d+)+\s* ...
Given a finite list of elements, how can I create a (lazily-evaluated, thanks LINQ!) infinite list that just keeps iterating over my initial list? If ...
I am looking through some example Fibonacci sequence clojure code: I generally understand what is going on, but don't get the point of lazy-cat. I ...
What is the most optimal way to find repetition in a infinite sequence of integers? i.e. if in the infinite sequence the number '5' appears twice the ...