import type { Nullable } from "@thi.ng/api" ; remarks param buf param start param end export function * arrayIterator < T > ( buf , start = 0 , end ? ) { if ( ! buf ) return ; start = start ; end === undefined && ( end = buf . length ) ; const step = start <= end ? 1 : - 1 ; for ( ; start !== end ; start += step ) { yield buf [ start ] ; } }