Skip to content

Feature/add prelude assoc function#47

Merged
wf001 merged 2 commits into
devfrom
feature/add-prelude-assoc-function
May 20, 2025
Merged

Feature/add prelude assoc function#47
wf001 merged 2 commits into
devfrom
feature/add-prelude-assoc-function

Conversation

@wf001
Copy link
Copy Markdown
Owner

@wf001 wf001 commented May 20, 2025

What’s this PR?

What’s changed?

add prelude assoc used like:

(defschema Country {
                    :name :: string
                  })

(defschema Person {
                   :name :: string
                   :country :: Country})

(def main :: int
  (fn []
    (let [co :: Country {:name "deutsch"}
          person :: Person {:name "jimmy"}]
      (prn (get (get person :country) :name))
      (prn (get (get (assoc person :country co) :country) :name))
      (prn (get (get person :country) :name))
      )))
nil
deutsch
nil

Anything else?

assoc has no side effects.

@wf001 wf001 merged commit 7b44a59 into dev May 20, 2025
1 check passed
@wf001 wf001 deleted the feature/add-prelude-assoc-function branch May 20, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant