This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"version":1,"resource":"file:///Users/aviatesk/IoPLMaterials/textbook/interpreter/dune-project","entries":[{"id":"VJTx","timestamp":1652783352000},{"id":"6qkI","timestamp":1652783387886}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MacroTools | |
function decompose_forblk(forblk) | |
spec, body = forblk.args | |
i, itr = spec.args | |
return i, itr, body | |
end | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ACS = Union{AbstractChar, AbstractString} | |
(l::ACS)(f::Function, rs::ACS...) = f(l, rs...) | |
(l::ACS)(rs::ACS...) = l(*, rs...) | |
'1'("23") # "123" | |
']' .|> collect("julia") .|> '[' |> join # "[j][u][l][i][a]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(q = :(println("(q = $(repr(q))) |> eval"))) |> eval |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# %% defines | |
function isabranch(numsary) | |
s = 0 | |
for (n1, n2) ∈ numsary | |
if n1 isa Int8 && n2 isa Int8 | |
s += 1 | |
elseif n1 isa Int8 && n2 isa Int16 | |
s += 2 | |
elseif n1 isa Int8 && n2 isa Int32 | |
s += 3 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder