The type limits are to be reachable from a type variable
This commit is contained in:
parent
7b22f0ed98
commit
b818e38cff
5
TODO.org
5
TODO.org
@ -1059,6 +1059,11 @@ An unknown call whose near miss is a value — =(context-allocator)= against
|
||||
=context/allocator=, or a global — says the name is a value written without
|
||||
parentheses, and names no call at all when the call had arguments.
|
||||
|
||||
** NEXT (max-of T) and (min-of T)
|
||||
Decided 2026-09-25: the type-limit constants as a form taking a type, Odin's
|
||||
max(T), valid at any numeric type or a numeric?-bounded variable. For a float,
|
||||
min-of is the most negative finite value.
|
||||
|
||||
* Backends
|
||||
|
||||
** DONE The x86 backend tracks LLVM at -O0
|
||||
|
||||
22
sand.flan
22
sand.flan
@ -25,28 +25,6 @@
|
||||
(defonce velocity [rows [cols f32]])
|
||||
(defonce current-color dyn 0)
|
||||
|
||||
(defn insertion-sort [coll [$t]] ()
|
||||
{:where (ordered? $t)}
|
||||
(let [i 1
|
||||
length (length coll)]
|
||||
(while (and (< i length))
|
||||
(let [j i]
|
||||
(while (and (> j 0)
|
||||
(< (at coll j) (at coll (dec j))))
|
||||
(let [temp (at coll j)]
|
||||
(set (at coll j) (at coll (dec j)))
|
||||
(set (at coll (dec j)) temp))
|
||||
(-- j)))
|
||||
(++ i))))
|
||||
|
||||
(comment
|
||||
(insertion-sort [\I \N \S \E \R \T \I \O \N \S \O \R \T])
|
||||
(insertion-sort (slice [6 2 4 9 1 9 4 5] 0 8))
|
||||
(let [str (bytes "INSERTIONSORT")]
|
||||
(insertion-sort str)
|
||||
(println str))
|
||||
:-)
|
||||
|
||||
(defn clear-grid [] ()
|
||||
(set grid (zeroed))
|
||||
(set velocity (zeroed)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user