I tried to find out more about the factors function, but writing this segment
factors :: Int -> Array (Array Int)
factors n = do
i <- 1 .. n
j <- i .. n
guard $ i * j
pure [i, j]
into test/MySolutions.purs
yields me this error
$ spago repl Compiling Test.MySolutions
Error found:
in module Test.MySolutions
at test/MySolutions.purs:61:10 - 61:12 (line 61, column 10 - line 61, column 12)
Unknown operator (..)
See https://github.com/purescript/documentation/blob/master/errors/UnknownName.md for more information,
or to contribute content related to this error.
spago: callCommand: purs repl ".spago/aff/v5.1.2/src/**/*.purs" ".spago/arrays/v5.3.1/src/**/*.purs" ".spago/avar/v3.0.0/src/**/*.purs" ".spago/bifunctors/v4.0.0/src/**/*.purs" ".spago/catenable-lists/v5.0.1/src/**/*.purs" ".spago/console/v4.4.0/src/**/*.purs" ".spago/const/v4.1.0/src/**/*.purs" ".spago/contravariant/v4.0.1/src/**/*.purs" ".spago/control/v4.2.0/src/**/*.purs" ".spago/datetime/v4.1.1/src/**/*.purs" ".spago/distributive/v4.0.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/either/v4.1.1/src/**/*.purs" ".spago/enums/v4.0.1/src/**/*.purs" ".spago/exceptions/v4.0.0/src/**/*.purs" ".spago/exists/v4.0.0/src/**/*.purs" ".spago/foldable-traversable/v4.1.1/src/**/*.purs" ".spago/free/v5.2.0/src/**/*.purs" ".spago/functions/v4.0.0/src/**/*.purs" ".spago/functors/v3.1.1/src/**/*.purs" ".spago/gen/v2.1.1/src/**/*.purs" ".spago/generics-rep/v6.1.1/src/**/*.purs" ".spago/globals/v4.1.0/src/**/*.purs" ".spago/identity/v4.1.0/src/**/*.purs" ".spago/integers/v4.0.0/src/**/*.purs" ".spago/invariant/v4.1.0/src/**/*.purs" ".spago/js-timers/v4.0.1/src/**/*.purs" ".spago/lazy/v4.0.0/src/**/*.purs" ".spago/lcg/v2.0.0/src/**/*.purs" ".spago/lists/v5.4.1/src/**/*.purs" ".spago/math/v2.1.1/src/**/*.purs" ".spago/maybe/v4.0.1/src/**/*.purs" ".spago/newtype/v3.0.0/src/**/*.purs" ".spago/nonempty/v5.0.0/src/**/*.purs" ".spago/ordered-collections/v1.6.1/src/**/*.purs" ".spago/orders/v4.0.0/src/**/*.purs" ".spago/parallel/v4.0.0/src/**/*.purs" ".spago/partial/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" ".spago/quickcheck/v6.1.0/src/**/*.purs" ".spago/random/v4.0.0/src/**/*.purs" ".spago/record/v2.0.2/src/**/*.purs" ".spago/refs/v4.1.0/src/**/*.purs" ".spago/st/v4.1.1/src/**/*.purs" ".spago/strings/v4.0.1/src/**/*.purs" ".spago/tailrec/v4.1.1/src/**/*.purs" ".spago/test-unit/stackless-default/src/**/*.purs" ".spago/transformers/v4.2.0/src/**/*.purs" ".spago/tuples/v5.1.0/src/**/*.purs" ".spago/type-equality/v3.0.0/src/**/*.purs" ".spago/unfoldable/v4.1.0/src/**/*.purs" ".spago/unsafe-coerce/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs" (exit 1): failed
is it due to the older version I have or missing modules?
I have this at the top of MySolutions so far
module Test.MySolutions where
import Prelude
import Data.Array (null, head, tail, uncons, length, filter)
import Data.Maybe (fromMaybe, Maybe(..))
import Math (pow)
import Data.Foldable
import Control.MonadZero