import { NO_OP } from "@thi.ng/api/api" ; import type { Reducer } from "./api.js" ; import { reduce , reducer } from "./reduce.js" ; export function last < T > ( ) ; export function last < T > ( xs ) ; export function last < T > ( xs ? ) { return xs ? reduce ( last ( ) , xs ) : reducer < T , T > ( < any > NO_OP , ( _ , x ) => x ) ; }