effect-io-ai

Package: effect
Module: STM

STM.head

Returns a successful effect with the head of the list if the list is non-empty or fails with the error None if the list is empty.

Signature

declare const head: <A, E, R>(self: STM<Iterable<A>, E, R>) => STM<A, Option.Option<E>, R>

Source

Since v2.0.0