Noogλe

search input

Function of the day

  • Intersects list list1 and another list (list2).

    O(nm) complexity.

    Inputs

    list1

    First list

    list2

    Second list

    Type

    intersectLists :: [a] -> [a] -> [a]
    

    Examples

    lib.lists.intersectLists usage example

    intersectLists [ 1 2 3 ] [ 6 3 2 ]
    => [ 3 2 ]