Created
January 17, 2023 02:25
-
-
Save slwu89/0a161695981c2cff2ad432c82c0419ed to your computer and use it in GitHub Desktop.
julia tricks and useful things
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
# 1. ---------- | |
# "guess what an appropriate container eltype would be for storing results of `f`..." | |
Base.promote_op | |
f() = true | |
Base.promote_op(f) | |
# 2. ---------- | |
# take apart whatever comes in | |
dump(f) | |
expr = :(+(1,2,3,4)) | |
dump(expr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment