diff --git a/simalq/tile/monster.hy b/simalq/tile/monster.hy index 7b1c352..067c540 100644 --- a/simalq/tile/monster.hy +++ b/simalq/tile/monster.hy @@ -418,7 +418,7 @@ :points-for-generator (classmethod (fn [cls] ~points-gen)) :flavor ~flavor-mon :flavor-for-generator ~flavor-gen - ~@(sum :start [] (gfor + ~@(hy.I.toolz.concat (gfor [k v] (.items kwargs) [(hy.models.Keyword k) v]))) diff --git a/simalq/tile/tilepedia.hy b/simalq/tile/tilepedia.hy index faa61e4..f96410c 100644 --- a/simalq/tile/tilepedia.hy +++ b/simalq/tile/tilepedia.hy @@ -2,6 +2,7 @@ (import + toolz [concat] metadict [MetaDict] simalq.color simalq.game-state [G] @@ -97,9 +98,9 @@ :href (+ "#" tile.id))))))))) ; One section of info screens per superclass - #* (cat (gfor + #* (concat (gfor [superclass-name tiles] (.items info) - [(E.h2 superclass-name) #* (cat (gfor + [(E.h2 superclass-name) #* (concat (gfor ; One info screen per tile type tile tiles [(E.h3 (mapsym tile) tile.long-name :id tile.id) @@ -131,9 +132,5 @@ (if self-closing "" f""))) -(defn cat [l] - (sum :start [] l)) - - (when (= __name__ "__main__") (print (html))) diff --git a/tests/lib.hy b/tests/lib.hy index 30431ed..89e02ef 100644 --- a/tests/lib.hy +++ b/tests/lib.hy @@ -5,6 +5,7 @@ (require hyrule [do-n unless]) (import + toolz [concat] metadict [MetaDict] simalq.geometry [Pos at Direction] simalq.un-iq [iq-quest] @@ -82,7 +83,8 @@ (hy.I.simalq/tile.Player :pos (Pos model player-x player-y))) (assert (= G.map.width model.width)) (assert (= G.map.height model.height)) - (for [[stack-actual stack-expected] (zip (sum :start #() G.map.data) (sum :start #() model.data))] + (for [[stack-actual stack-expected] + (zip (concat G.map.data) (concat model.data))] (assert (= (len stack-actual) (len stack-expected))) (for [[t-actual t-expected] (zip stack-actual stack-expected)] (assert (= t-actual.stem t-expected.stem)))))