We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 513282c commit 0e8e384Copy full SHA for 0e8e384
array_to_list.ts
@@ -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