Snippets tagged lists

  • Pascal's Triangle

    This code sample generates Pascal's triangle as jagged 2D list (list of lists).

    19 people like this

    Posted: 13 years ago by Dmitry Soshnikov

  • Palindromic dates

    Today, 11. february 2011, is a palindromic day according to the European date format (day/month/year). This snippet collects all the palindromic dates until 31 dec. 9999. They are 366, a surprisingly low number.

    13 people like this

    Posted: 13 years ago by Francesco De Vittori

  • Extensions to the Fold function

    This snippet is helpfull in the following cases: 1) After a consolidation operation using the fold function we need to know how many elements have been processed. 2) A consolidation operation needs to use the index of each of the elements processed and we don't want to use the mapi function first. 3) A combination of the above. Since the following snippet just adds a wrapper to the existing Fold function we can repeat the approach for arrays and sequences (including the plinq ones)

    31 people like this

    Posted: 13 years ago by Horacio Nuñez

  • JoinList

    A JoinList is a variation on the list type that offers a constant time append operation.

    5 people like this

    Posted: 13 years ago by Ryan Riley

  • Ninety-Nine F# Problems - Problems 1 - 10 - Lists

    These are F# solutions of Ninety-Nine Haskell Problems which are themselves translations of Ninety-Nine Lisp Problems and Ninety-Nine Prolog Problems. The solutions are hidden so you can try to solve them yourself.

    34 people like this

    Posted: 12 years ago by Cesar Mendoza

  • Ninety-Nine F# Problems - Problems 21 - 28 - Lists again

    These are F# solutions of Ninety-Nine Haskell Problems which are themselves translations of Ninety-Nine Lisp Problems and Ninety-Nine Prolog Problems. The solutions are hidden so you can try to solve them yourself.

    6 people like this

    Posted: 12 years ago by Cesar Mendoza

  • List comparison

    Find what's been added, removed or changed between two lists (perfom a diff between two lists of items).

    4 people like this

    Posted: 10 years ago by Daniel Bradley

  • Nested list functions

    Higher-order functions for working with nested lists that reimplement various useful List module functions, but work on nested lists, preserving the original nesting strucutre when possible.

    3 people like this

    Posted: 2 months ago by Tomas Petricek