unshittify templates
This commit is contained in:
@@ -5,11 +5,17 @@
|
||||
|
||||
(load "list.hsex")
|
||||
|
||||
(instance list-int list-T (int))
|
||||
(instance make-list-int make-list-T (int))
|
||||
(instance add-value-list-int add-value-list-T (int))
|
||||
(instance length-list-int length-list-T (int))
|
||||
(instance is-empty-list-int is-empty-list-T (int))
|
||||
(struct foo
|
||||
((float a)
|
||||
(int b)))
|
||||
|
||||
,(list-T '(int))
|
||||
,(make-list-T '(int) #f)
|
||||
,(add-value-list-T '(int) #f)
|
||||
,(length-list-T '(int) #f)
|
||||
,(is-empty-list-T '(int) #f)
|
||||
|
||||
(fn bool bar () false)
|
||||
|
||||
(pub fn int main ()
|
||||
(var (* list-int) l (make-list-int))
|
||||
@@ -17,6 +23,6 @@
|
||||
(add-value-list-int l 3)
|
||||
(add-value-list-int l 4)
|
||||
(printf "Size of the list: %zu\n" (length-list-int l))
|
||||
,(list-for-each l v (printf "%d " v))
|
||||
,(list-for-each '((printf "%d " v) l v))
|
||||
(printf "\n")
|
||||
0)
|
||||
|
||||
Reference in New Issue
Block a user