hsc3-lang-0.14: Haskell SuperCollider Language

Safe HaskellSafe-Inferred

Sound.SC3.Lang.Collection.Extension

Description

Variants of standard numerical operators with SC3 extension behaviour. Pointwise operations in SuperCollider language extend the shorter input by cycling.

 [1,2] +. [3,4,5] == [1,2,1] +. [3,4,5]
 [1,2] +. [3,4,5] == [4,6,6]

The function underlying the list numerical instances is zipWith_c.

 zipWith (+) [1,2] [3,4,5] == [4,6]
 zipWith_c (+) [1,2] [3,4,5] == [4,6,6]

Synopsis

Documentation

class Extending f whereSource

Class defining zipWith_c which is a cycle extending variant of zipWith.

Methods

zipWith_c :: (a -> b -> c) -> f a -> f b -> f cSource

Instances

(+.) :: (Extending f, Num a) => f a -> f a -> f aSource

(*.) :: (Extending f, Num a) => f a -> f a -> f aSource

(/.) :: (Extending f, Fractional a) => f a -> f a -> f aSource

(-.) :: (Extending f, Num a) => f a -> f a -> f aSource