MCPcopy Index your code
hub / github.com/Effect-TS/effect / last

Function last

packages/typeclass/src/Semigroup.ts:117–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115 * @since 0.24.0
116 */
117export const last = <A = never>(): Semigroup<A> =>
118 make(
119 (_, second) => second,
120 (self, collection) => {
121 let a: A = self
122 // eslint-disable-next-line no-empty
123 for (a of collection) {}
124 return a
125 }
126 )
127
128/**
129 * @since 0.24.0

Callers

nothing calls this directly

Calls 1

makeFunction · 0.70

Tested by

no test coverage detected