hsc3-lang-0.15: Haskell SuperCollider Language

Safe HaskellNone
LanguageHaskell98

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 where Source

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

Methods

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

Instances

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

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

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

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