Skip to content

Commit 0e8e384

Browse files
committed
✨ List
1 parent 513282c commit 0e8e384

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

array_to_list.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export interface List<T> {
2+
value: T;
3+
rest: List<T> | null;
4+
}
5+
export function arrayToList<T>(values: T[]): List<T> {
6+
const [hey] = values;
7+
return { value: hey, rest: null };
8+
}

0 commit comments

Comments
 (0)