Module

WAGS.MoveNode

Package
purescript-wags
Repository
mikesol/purescript-wags

#MoveNode Source

class MoveNode (from :: Nat) (to :: Nat) (i :: Graph) (o :: Graph) | from to i -> o where

Move a node in a graph.

from - the index of the node we are moving to - the new position in the list i - the input universe o - the output universe

Members

Instances

#NodeListLen Source

class NodeListLen (i :: NodeList) (n :: Nat) | i -> n

Get the length of node list i as natural number n/

Instances

#MoveNodeInternal Source

class MoveNodeInternal (from :: Nat) (to :: Nat) (i :: NodeList) (o :: NodeList) | from to i -> o

Move a poitner from position from to position to in list i and return it as o.

Instances

#InsertInNode Source

class InsertInNode (fnode :: Node) (newTo :: Nat) (i' :: NodeList) (o :: NodeList) | fnode newTo i' -> o

Insert a poitner fnode at newTo in list i' and return it as o.

Instances

#RemoveAtNode Source

class RemoveAtNode (from :: Nat) (i :: NodeList) (fnode :: Node) (i' :: NodeList) | from i -> fnode i'

Remove whatever is at position from in list i, returning the removed fnode as well as the new pointer list i'.

Instances