JanetDocsI'm feeling luckyGithub sign in

idempotent?



    function
    boot.janet on line 117, column 1

    (idempotent? x)
    
    Check if x is a value that evaluates to itself when compiled.


1 exampleSign in to add an example
Loading...
(map idempotent?  [ nil  true 97   'a   :a   "a"  ])
# =>             @[ true true true true true true ]

(map idempotent?  [  [97]   @[97]  {0 97}  @{0 97}  ])
# =>             @[  false  false  false   false    ]

(map idempotent?  [  (fn [])  even?  loop  file/open  ])
# =>             @[  true     true   true  true       ]

(map idempotent?  [  (file/temp)  (fiber/new (fn []))  ])
# =>             @[  true         true                 ]
cellularmitosis