Noogλe

search input

Function of the day

  • Map with index starting from 1

    Inputs

    f

    1. Function argument

    list

    2. Function argument

    Type

    imap1 :: (Int -> a -> b) -> [a] -> [b]
    

    Examples

    lib.lists.imap1 usage example

    imap1 (i: v: "${v}-${toString i}") ["a" "b"]
    => [ "a-1" "b-2" ]