In reading Hadley Wickham's Advanced R I learned about the difference between atomic vectors and lists; and matrices/arrays and dataframes. This is something I hadn't really appreciated before, and ...

I have been using Collections.max(list) for many projects, but I occasionally want to find the index of that maximum element. I feel silly writing a function to do this for myself in every program I ...

I'm a CS alumni, but we didn't learn much by the way of OOP, or Design Patterns. I've heard the phrase C with iostreams and thought it fitting. Anyway that's besides the point. I am just curious about ...

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
(define (take-while p xs)
...

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 ...

In my application users have lists. They can either add a new item to their list or add an item from a previous list. The set of all items I'll call G (global) (each user's global list is their own).
...

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 ...

By index, I mean, as the user creates the list, each item receives an integer index for its place in that particular list. Since there will be a table of ListItems, I'd prefer to avoid using the name ...

I want to create a simple game. Every so often, a power up should appear. Right now the different kinds of power ups are stored in an array.
However, not every power up should appear equally often: ...

I am developing a new project where I will be constantly checking a webpage for data and adding this data to a queue for processing. This data will then be removed from the queue and added to a list ...

In languages where cons lists are a major datatype, it is very easy to create a list from last to first by prepending items. When doing processing from some input file, however, one is most likely to ...

According to the commonly used TDD strategy, to implement something, you write a test that fail the code first, write the simplest code, refactor, and then repeat. I am trying to imagine this scenario ...

I have just started a C programming course and so far have only done the basics like printf, read a little on variables etc on the course book. The teacher has tasked us with writing a program that ...

I have noticed that most functional languages employ a singly-linked list (a "cons" list) as their most fundamental list types. Examples include CLisp, Haskell and F#. This is different to mainstream ...