JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in
# Since table/clone produces a shallow copy and composing freeze and thaw makes everything mutable/immutable (defn deep-clone [ds] (prewalk |(cond (table? $) (table/clone $) (array? $) (array/slice $) (buffer? $) (buffer/slice $) $) ds)) # CalebF wrote this: https://janet.zulipchat.com/#narrow/channel/409517-help/topic/table.2Fclone.20doesn.27t.20make.20a.20deep.20copy.3F/near/617675442