Search results

An Array: a data structure supporting efficient random access. In the JavaScript backend, values of this type are represented as JavaScript Arrays at runtime.

Construct values using literals:

x = [1,2,3,4,5] :: Array Int
P <builtin> M Prim
array :: forall a. JsonCodec a -> JsonCodec (Array a)

A codec for arbitrary length Arrays where every item in the array shares the same type.

import Data.Codec.Argonaut as CA

codecIntArray ∷ CA.JsonCodec (Array Int)
codecIntArray = CA.array CA.int
P purescript-codec-argonaut M Data.Codec.Argonaut
array :: forall a. Codec a -> Codec (Array a)

A codec for arbitrary length Arrays where every item in the array shares the same type.

import Data.Codec.JSON as CJ

codecIntArray ∷ CJ.Codec (Array Int)
codecIntArray = CJ.array CJ.int
P purescript-codec-json M Data.Codec.JSON
array :: forall t. Corecursive t EJsonF => Array t -> t
P purescript-ejson M Data.Json.Extended
Array :: forall a. (Array a) -> EJsonF a
P purescript-ejson M Data.Json.Extended.Signature.Core
Array :: EJsonType
P purescript-ejson M Data.Json.Extended.Type
array :: forall a. Arbitrary a -> Arbitrary (Array a)
P purescript-classless-arbitrary M Classless.Arbitrary
array :: forall a. DecodeJson a -> DecodeJson (Array a)
P purescript-classless-decode-json M Classless.DecodeJson
array :: forall a. EncodeJson a -> EncodeJson (Array a)
P purescript-classless-encode-json M Classless.EncodeJson
array :: forall r. Monoid r => Fold' r Foreign (Array Foreign)

A Fold which reads an Array.

P purescript-foreign-lens M Data.Foreign.Lens
array :: forall opt html fm fs msg sta a. OptArgs (CfgArray a) opt => IDHtml html => opt -> DataUI (IDSurface html) fm fs msg sta a -> DataUI (IDSurface html) fm fs (ArrayMsg (fm msg)) (ArrayState (fs sta)) (Array a)
P purescript-interactive-data M InteractiveData.DataUIs.Array
Array :: Schema -> Schema
P purescript-json-schema M Data.JSON.Schema
array :: forall props u a. { addLabel :: String, defaultValue :: u, editor :: FormBuilder { readonly :: Boolean | props } u a, label :: String } -> FormBuilder { readonly :: Boolean | props } (Array u) (Array a)

Edit an Array of values.

This FormBuilder displays a removable section for each array element, along with an "Add..." button in the final row.

P purescript-lumi-components M Lumi.Components.Form
array :: forall m b a. Index a => Monad m => String -> ParserT (Array Foreign) m b -> ParserT Foreign m b
P purescript-parsing-foreign M Text.Parsing.Foreign
Array :: RowMode
P purescript-pg M Postgres.Query
array :: forall m. Monad m => FieldValueDual m (Array String)
P purescript-polyform-validators M Polyform.Dual.Validators.UrlEncoded
array :: forall e m. Monad m => Validator m e (Array Json)
P purescript-polyform-validators M Polyform.Validators.Json
array :: forall m. Monad m => FieldValueValidator m (Array String)
P purescript-polyform-validators M Polyform.Validators.UrlEncoded
Array :: AttributeType
P purescript-rmrk-parser M RMRK.Primitives.Properties
array :: forall i context channel. String -> SDOM (ArrayChannel i channel) (ArrayContext context) i i -> SDOM channel context (Array i) (Array i)

Create a component which renders an array of subcomponents.

The first argument is the name of the HTML element used as the container.

The second argument is a template component for rendered subcomponents.

Note:

  • The context of the template component provides access to the index of the current subcomponent.
  • The event channel for the template component provides the ability to modify the input array itself.
  • This component is optimized for edits at the end of the array. Small arrays should not present any issues, but large arrays might if edits typically take place away from the end of the array.
P purescript-sdom M SDOM
array :: forall f t. Corecursive t (SqlF EJsonF) => Foldable f => f t -> t
P purescript-sql-squared M SqlSquared.Constructors
array :: forall r mode idx val. Expr r idx => Expr r val => Z3 r mode (Z3Array r idx val)

Create an array Z3 variable (not to be confused with an array of Z3 variables)

P purescript-z3 M Z3
array_ :: forall html fm fs msg sta a. IDHtml html => DataUI (IDSurface html) fm fs msg sta a -> DataUI (IDSurface html) fm fs (ArrayMsg (fm msg)) (ArrayState (fs sta)) (Array a)
P purescript-interactive-data M InteractiveData.DataUIs.Array
P purescript-mathbox M Mathbox.Class.Data.Array
Array_ :: Array_ -> MathboxPrimitive
P purescript-mathbox M Mathbox.Mathbox
arrayOf :: forall a. Gen a -> Gen (Array a)

Create a random generator which generates an array of random values.

P purescript-quickcheck M Test.QuickCheck.Gen
P purescript-mathbox M Mathbox.Class.Data.Array
arrayOf :: forall m a. MonadRec m => GenT m a -> GenT m (Array a)

Create a random generator which generates an array of random values. Stack-safety is guaranteed via the MonadRec constraint

P purescript-generate-values M Control.Monad.Gen.Trans
arrayOf :: forall a. Gen a -> Gen (Array a)

Generates an array of random length. The maximum length depends on the size parameter.

P purescript-jack M Jack.Combinators
arrayOf :: forall o e m. Monad m => JsonDual m e o -> JsonDual m e (Array o)
P purescript-polyform-validators M Polyform.Duals.Validators.Json
arrayOf :: forall a e m. Monad m => Validator m e a -> Validator m e (Array a)
P purescript-polyform-validators M Polyform.Validators.Json
arrayOf1 :: forall a. Gen a -> Gen (NonEmptyArray a)

Create a random generator which generates a non-empty array of random values.

P purescript-quickcheck M Test.QuickCheck.Gen
ArrayAgg :: forall input rest fields output. input -> Aggregate input rest fields output
P purescript-droplet M Droplet.Language.Internal.Function
P purescript-interactive-data M InteractiveData.DataUIs.Array
arrayOf' :: forall m a. Monad m => GenT m a -> GenT m (Array a)

Create a random generator which generates an array of random values. This is only stack-safe if the underlying monad is stack-safe.

P purescript-generate-values M Control.Monad.Gen.Trans
arrayOf1 :: forall m a. MonadRec m => GenT m a -> GenT m (NonEmptyArray a)

Create a random generator which generates a non-empty array of random values. Stack-safety is guaranteed via the MonadRec constraint

P purescript-generate-values M Control.Monad.Gen.Trans
arrayOf1 :: forall a. Gen a -> Gen (NonEmpty Array a)

Generates a non-empty array of random length. The maximum length depends on the size parameter.

P purescript-jack M Jack.Combinators
arrayOfN :: forall a. Int -> Gen a -> Gen (Array a)

Generates an array of the given length.

P purescript-jack M Jack.Combinators
ArrayPop :: forall value. ArrayUpdate value
P purescript-panda M Panda.Internal.Types

The unifying representation for the different typed arrays

P purescript-arraybuffer-types M Data.ArrayBuffer.Types
ArrayView :: (forall r. (forall a. ArrayView a -> r) -> r) -> RequestBody
P purescript-affjax M Affjax.RequestBody
arrayView :: forall a. ArrayView a -> RequestBody
P purescript-affjax M Affjax.RequestBody
P purescript-has-js-rep M HasJSRep
array_agg :: forall f t fields. ToArrayAgg f fields t => f -> Aggregate f E fields (Maybe (Array t))
P purescript-droplet M Droplet.Language.Internal.Function
ArrayMove :: forall value. Int -> Int -> ArrayUpdate value
P purescript-panda M Panda.Internal.Types
arrayOf1' :: forall m a. Monad m => GenT m a -> GenT m (NonEmptyArray a)

Create a random generator which generates a non-empty array of random values. This is only stack-safe if the underlying monad is stack-safe.

P purescript-generate-values M Control.Monad.Gen.Trans
arrayOfN' :: forall a. Int -> Int -> Gen a -> Gen (Array a)

Generates an array between 'n' and 'm' in length.

P purescript-jack M Jack.Combinators
ArrayPush :: forall value. value -> ArrayUpdate value
P purescript-panda M Panda.Internal.Types
P purescript-son-of-a-j M SonJ
arrayType :: PSType -> PSType
P purescript-ps-cst M Language.PS.CST.Sugar.Declaration
arrayType :: PSType -> PSType
P purescript-ps-cst M Language.PS.SmartCST.Sugar.Declaration
ArrayType :: { elementType :: String, nesting :: Int } -> Type
P purescript-webidl M WebIDL
P purescript-array-views M Data.ArrayView.Internal
array_ToJs :: Array_ -> JsArray_
P purescript-mathbox M Mathbox.Class.Data.Array
P purescript-generic-graphviz M Data.GenericGraph
ArrayEmpty :: forall value. ArrayUpdate value
P purescript-panda M Panda.Internal.Types
P purescript-neon M Neon.Class.HasOr
arrayModal :: forall props componentProps a. Union componentProps (onChange :: a -> Effect Unit, value :: a) (onChange :: a -> Effect Unit, value :: a | componentProps) => Nub (onChange :: a -> Effect Unit, value :: a | componentProps) (onChange :: a -> Effect Unit, value :: a | componentProps) => { addLabel :: String, component :: { onChange :: a -> Effect Unit, value :: a | componentProps } -> JSX, componentProps :: Record componentProps, defaultValue :: a, label :: String, summary :: { readonly :: Boolean | props } -> a -> JSX } -> FormBuilder { readonly :: Boolean | props } (Array a) (Array a)

Edit an Array of values.

Unlike array, this FormBuilder uses a modal popup for adding and editing array elements.

Note: arrayModal does not support validation, in the sense that the component inside the modal popup cannot reject its form state when the use clicks the save button.

P purescript-lumi-components M Lumi.Components.Form
ArrayQuery :: (Array String) -> Query
P purescript-http-types-basic M Data.HttpTypes.V000
ArrayShift :: forall value. ArrayUpdate value
P purescript-panda M Panda.Internal.Types
P purescript-interactive-data M InteractiveData.DataUIs.Array

Represents a JS ArrayBuffer object

P purescript-arraybuffer-types M Data.ArrayBuffer.Types
P purescript-foreign-generic M Foreign.Generic.Class
P purescript-foreign-generic M Foreign.Generic.Class
ArrayBuffer :: forall a. (forall f. f ArrayBuffer -> f a) -> ResponseFormat a
P purescript-affjax M Affjax.ResponseFormat
arrayBuffer :: ResponseFormat ArrayBuffer
P purescript-affjax M Affjax.ResponseFormat
arrayBuffer :: ResponseType ArrayBuffer
P purescript-web-xhr M Web.XHR.ResponseType
arrayBuffer :: Response -> Aff ArrayBuffer
P purescript-milkis M Milkis
P purescript-web3 M Network.Ethereum.Web3.Solidity.Event
arrayParser :: forall a. ArrayParser a => Array HexString -> Maybe a
P purescript-web3 M Network.Ethereum.Web3.Solidity.Event
arrayBuffer :: Response -> Effect (Promise ArrayBuffer)
P purescript-js-fetch M JS.Fetch.Response
P purescript-incremental-functions M Data.Incremental.Array
P purescript-open-foreign-generic M Foreign.Generic.Class
P purescript-open-foreign-generic M Foreign.Generic.Class
arrayBuffer :: Response -> Effect (JSPromise ArrayBuffer)
P purescript-calpis M Calpis
arrayBuffer :: MIME -> ArrayBuffer -> Body
P purescript-ezfetch M Effect.Aff.HTTP.Request
arrayBuffer :: forall m. MonadAff m => Response -> m ArrayBuffer
P purescript-ezfetch M Effect.Aff.HTTP.Response
arrayBuffer :: Response -> Aff ArrayBuffer
P purescript-fetch M Fetch.Internal.Response
arrayBuffer :: Response -> Effect (Promise ArrayBuffer)
P purescript-fetch-core M Fetch.Core.Response
arrayBuffer :: Response -> Effect (Promise ArrayBuffer)
P purescript-web-fetch M Web.Fetch.Response
ArrayBuffer :: BinaryType
P purescript-web-socket M Web.Socket.BinaryType
ArrayBuffer :: BinaryType
P purescript-websocket-simple M WebSocket
arrayBuffer :: Response -> Aff ArrayBuffer
P purescript-yoga-fetch M Yoga.Fetch
P purescript-neon M Neon.Class.HasAdd
P purescript-neon M Neon.Class.HasAnd
P purescript-neon M Neon.Class.HasMap
ArrayHeader :: (Array String) -> Header
P purescript-http-types-basic M Data.HttpTypes.V000
arrayOfLeft :: forall b a. Either a b -> Array a
P purescript-impulse M Impulse.Util.Rebuildable

This typeclass allows to convert any function that operates on Array to a function that operates on ArrayView and vice versa. use only inserts fromArray and toArray in the right places, so don't expect it to increase performance.

Note: either type annotation or partial application of some number of arguments is needed, because otherwise the type inference will not be able to guess the correct type.

import Data.Array as A

-- OK
zipWith :: forall a b c. (a -> b -> c) -> ArrayView a -> ArrayView b -> ArrayView c
zipWith = use (A.zipWith :: (a -> b -> c) -> Array a -> Array b -> Array c)

-- OK
zipWith :: forall a b c. (a -> b -> c) -> ArrayView a -> ArrayView b -> ArrayView c
zipWith f = use (A.zipWith f) -- all three type parameters are tied to `f`

-- Type error
zipWith :: forall a b c. (a -> b -> c) -> ArrayView a -> ArrayView b -> ArrayView c
zipWith = use A.zipWith
P purescript-array-views M Data.ArrayView.Internal
P purescript-yaml-next M Data.YAML.Foreign.Encode

An algebra for array updates. We use this to describe the ways in which we would like to update the DOM.

P purescript-panda M Panda.Internal.Types

An immutable Zipper for an Array.

This Zipper works well in read-heavy code but might not work well in write-heavy code

Modifications to the focused element are O(n) due to creating a new immutable array with the change rather than mutating the underlying array.

Navigating to a new focus element is O(1) regardless of how far away from the current focus that element is. This is in contrast to a List-based zipper where modifications are O(1) and navigation is O(n).

[0, 1, 2, 3, 4, 5] <-- underlying array
         ^      ^
         |      -- maxIndex
         -- focusIndex
P purescript-arrays-zipper M Data.Zipper.ArrayZipper

Array search functions.

ARRAY_BUFFER :: BufferTarget
P purescript-webgl M Graphics.WebGL

The event channel for an array component.

An event is either passed to the next Parent in the chain, or handled Here, by acting on the array itself.

P purescript-sdom M SDOM

The context of subcomponent in an array component includes the current context inherited from the parent, as well as the index of the current subcomponent.

P purescript-sdom M SDOM
P purescript-neon M Neon.Class.HasLess
P purescript-neon M Neon.Class.HasPure
P purescript-neon M Neon.Class.HasZero
ArrayLiteral :: forall a. (Array a) -> Literal a
P purescript-purescript-compiler-backend-utilities M PureScript.CoreFn
arrayOfMaybe :: forall a. Maybe a -> Array a
P purescript-impulse M Impulse.Util.Rebuildable
arrayOfRight :: forall b a. Either a b -> Array b
P purescript-impulse M Impulse.Util.Rebuildable
ArrayUnshift :: forall value. value -> ArrayUpdate value
P purescript-panda M Panda.Internal.Types
P purescript-arraybuffer-types M Data.ArrayBuffer.Types
ArrayDeleteAt :: forall value. Int -> ArrayUpdate value
P purescript-panda M Panda.Internal.Types
P purescript-neon M Neon.Class.HasApply
P purescript-neon M Neon.Class.HasChain
P purescript-neon M Neon.Class.HasEqual
P purescript-ohyes M OhYes
ArrayInsertAt :: forall value. Int -> value -> ArrayUpdate value
P purescript-panda M Panda.Internal.Types
P purescript-apexcharts M Apexcharts.Stroke
P purescript-apexcharts M Apexcharts.Stroke
P purescript-array-views M Data.ArrayView.Internal
P purescript-array-views M Data.ArrayView.Internal
P purescript-array-views M Data.ArrayView.Internal
P purescript-array-views M Data.ArrayView.Internal
P purescript-monad-control M Control.Monad.Base
P purescript-neon M Neon.Class.HasFilter
P purescript-neon M Neon.Class.HasReduce
P purescript-web3 M Network.Ethereum.Web3.Solidity.Event
P purescript-webgl M Graphics.WebGLRaw
P purescript-webgl2-raw M WebGL.Raw.Types
arrayFromDigits :: Digits -> Array Char

Unwrap Array of Chars from Digits container

P purescript-base-rationals M BaseRationals
P purescript-neon M Neon.Class.HasCompare
P purescript-bismuth M Bismuth
P purescript-neon M Neon.Class.HasGreater
P purescript-neon M Neon.Class.HasInspect
P purescript-neon M Neon.Class.HasToArray
P purescript-array-views M Data.ArrayView.Internal
P purescript-array-views M Data.ArrayView.Internal
P purescript-neon M Neon.Class.HasSubtract
P purescript-array-views M Data.ArrayView.Internal
P purescript-array-views M Data.ArrayView.Internal
P purescript-array-views M Data.ArrayView.Internal
P purescript-web3 M Network.Ethereum.Web3.Solidity.Event
P purescript-neon M Neon.Class.HasFromArray
P purescript-tortellini M Tortellini
P purescript-reactnative M ReactNative.Components.ListView
P purescript-presto M Presto.Core.Types.Language.Storage
P purescript-p5 M P5.Types
P purescript-array-views M Data.ArrayView.Internal
P purescript-array-views M Data.ArrayView.Internal
P purescript-array-views M Data.ArrayView.Internal
P purescript-reactnative M ReactNative.Components.ListView
P purescript-p5 M P5.Types
P purescript-web3 M Network.Ethereum.Web3.Solidity.Event
P purescript-monad-control M Control.Monad.Trans.Control
array_aggFunctionName :: String
P purescript-droplet M Droplet.Language.Internal.Token
array_subscript_error :: String
P purescript-pg M Postgres.Error.Codes
P purescript-web3 M Network.Ethereum.Web3.Solidity.Event
ArrayNumberOrImageImage :: Image -> ArrayNumberOrImage
P purescript-p5 M P5.Types
ArrayNumberOrVectorVector :: Vector -> ArrayNumberOrVector
P purescript-p5 M P5.Types
P purescript-p5 M P5.Types
ArrayNumberOrImageArrayNumber :: (Array Number) -> ArrayNumberOrImage
P purescript-p5 M P5.Types
ArrayNumberOrVectorArrayNumber :: (Array Number) -> ArrayNumberOrVector
P purescript-p5 M P5.Types
ArrayNumberOrStringOrColorColor :: Color -> ArrayNumberOrStringOrColor
P purescript-p5 M P5.Types
ArrayNumberOrStringOrColorString :: String -> ArrayNumberOrStringOrColor
P purescript-p5 M P5.Types
ArrayNumberOrStringOrColorArrayNumber :: (Array Number) -> ArrayNumberOrStringOrColor
P purescript-p5 M P5.Types
P purescript-graphqlclient M GraphQLClient.Implementation

No further results.