Why it is `(cons 1 (cons 2 (cons 3 nil)))` and not `(cons 3 (cons 2 (cons 1 nil)))` for [1,2,3]?
Is there any special reason that to construct list in Scheme you use
Why it is `(cons 1 (cons 2 (cons 3 nil)))` and not `(cons 3 (cons 2 (cons 1 nil)))` for [1,2,3]?
Is there any special reason that to construct list in Scheme you use
Mapping a list of optional values to an optional list of values
I have encountered the following pattern while programming in Haskell (but the pattern could occur in any language supporting lists, option types, and mapping of a function over a list). I have types a
and b
and a function
Mapping a list of optional values to an optional list of values
I have encountered the following pattern while programming in Haskell (but the pattern could occur in any language supporting lists, option types, and mapping of a function over a list). I have types a
and b
and a function
Is there a design pattern for updating lists?
I want to modify one list (actually info stored in a database). A person doesn’t have access to update every part of the list, but can update and delete parts they do have access to and add whatever they want to the list.
Using a list of tuples vs a list of custom objects
I have a situation where I have several text documents and I want to create a list that contains the words in those documents. But I also need to record several properties of each word. These properties are
Using a list of tuples vs a list of custom objects
I have a situation where I have several text documents and I want to create a list that contains the words in those documents. But I also need to record several properties of each word. These properties are
Using a list of tuples vs a list of custom objects
I have a situation where I have several text documents and I want to create a list that contains the words in those documents. But I also need to record several properties of each word. These properties are
Tail-recursive implementation of take-while
I am trying to write a tail-recursive implementation of the function take-while
in Scheme (but this exercise can be done in another language as well). My first attempt was
Tail-recursive implementation of take-while
I am trying to write a tail-recursive implementation of the function take-while
in Scheme (but this exercise can be done in another language as well). My first attempt was