Skip to content

Commit

Permalink
Updated the Julia implementations to use sets
Browse files Browse the repository at this point in the history
  • Loading branch information
B-rando1 committed Aug 23, 2024
1 parent 3afb7f7 commit c753175
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ instance List JuliaCode where

instance Set JuliaCode where
contains s e = funcApp "in" bool [e, s]
setAdd = CP.listAppend
setRemove = CP.listAppend
setAdd s e = funcApp "push!" void [s, e]
setRemove s e = funcApp "delete!" void [s, e]

instance InternalList JuliaCode where
listSlice' b e s vn vo = jlListSlice vn vo b e (fromMaybe (litInt 1) s)
Expand All @@ -420,8 +420,8 @@ instance InternalListFunc JuliaCode where
listSetFunc = CP.listSetFunc R.listSetFunc

instance InternalSetFunc JuliaCode where
setAddFunc = listAppendFunc
setRemoveFunc = listAppendFunc
setAddFunc _ _ = error "not used by Julia"
setRemoveFunc _ _ = error "not used by Julia"

instance ThunkSym JuliaCode where
type Thunk JuliaCode = CommonThunk VS
Expand Down

0 comments on commit c753175

Please sign in to comment.