aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/target/jvm/magic.lux
blob: 70859362b50a08b1b9d4c5a7ebc7a5e526d9e7c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(.module:
  [library
   [lux #*
    [control
     ["." try]]
    [math
     [number (#+ hex)]]]]
  ["." // #_
   [encoding
    ["#." unsigned (#+ U4)]]])

(type: #export Magic
  U4)

(def: #export code
  Magic
  (|> (hex "CAFEBABE") //unsigned.u4 try.assume))

(def: #export writer
  //unsigned.writer/4)