def get.last

shake@0.7.0.0 · src/cli.bend:494

import shake@0.7.0.0/src/cli.bend as Cli
import Base

494# the last of a list of values, or `dflt` when it is empty
495def get.last(vs: List<&2, String>, dflt: Maybe<&2, String>) -> Maybe<&2, String>:
496  match vs:
497    case Nil{}:
498      dflt
499    case Con{hh, tt}:
500      get.last(tt, Some{hh})

Uses (3)

Used by (1)