8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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