mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
core: add Byte.hash
This commit is contained in:
parent
15c27bdb49
commit
98bc275ea5
@ -29,6 +29,10 @@
|
||||
(defn hash [k] (to-int (the Char @k)))
|
||||
)
|
||||
|
||||
(defmodule Byte
|
||||
(defn hash [k] (to-int (the Byte @k)))
|
||||
)
|
||||
|
||||
(defmodule Float
|
||||
(defn hash [k] (to-bytes @k))
|
||||
)
|
||||
|
@ -545,6 +545,25 @@
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div class="binder">
|
||||
<a class="anchor" href="#hash">
|
||||
<h3 id="hash">
|
||||
hash
|
||||
</h3>
|
||||
</a>
|
||||
<div class="description">
|
||||
defn
|
||||
</div>
|
||||
<p class="sig">
|
||||
(λ [&Byte] Int)
|
||||
</p>
|
||||
<pre class="args">
|
||||
(hash k)
|
||||
</pre>
|
||||
<p class="doc">
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div class="binder">
|
||||
<a class="anchor" href="#inc">
|
||||
<h3 id="inc">
|
||||
|
Loading…
Reference in New Issue
Block a user