Documentation

Batteries.Data.FloatArray

@[inline]
unsafe def FloatArray.mapMUnsafe {m : TypeType u_1} [Monad m] (a : FloatArray) (f : Floatm Float) :
m FloatArray

Unsafe optimized implementation of mapM.

This function is unsafe because it relies on the implementation limit that the size of an array is always less than USize.size.

Equations
Instances For
    @[specialize #[]]
    unsafe def FloatArray.mapMUnsafe.loop {m : TypeType u_1} [Monad m] (f : Floatm Float) (a : FloatArray) (k s : USize) :
    m FloatArray

    Inner loop for mapMUnsafe.

    Equations
    Instances For
      @[implemented_by FloatArray.mapMUnsafe]
      def FloatArray.mapM {m : TypeType u_1} [Monad m] (a : FloatArray) (f : Floatm Float) :
      m FloatArray

      mapM f a applies the monadic function f to each element of the array.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[inline]
        def FloatArray.map (a : FloatArray) (f : FloatFloat) :
        FloatArray

        map f a applies the function f to each element of the array.

        Equations
        Instances For