Murat Kasimov

More about me

Я language (β)

/Я language (β)/Morphisms/shift/

Some Primitives have a window inside that you can shift. Direction for shifting per each primitive is defined by Shifter.

> shift : Shifter List `AR_____` Supertype ( Event `T'I` Scrolling List i `T'I` Maybe ( Alone i ) ) > shift : Shifter Tree `AR_____` Supertype ( Event `T'I` Scrolling Tree i `T'I` Maybe ( Alone i ) ) > shift : Shifter List `AR_____` Supertype ( Event `T'I` Sliding List i `T'I` Maybe ( List i ) )

If you can shift towards chosen direction - it results with updated state and Exist updated window:

> shift `hv'he` Right `hv` [ [ ] , [ A ] , [ B , C ] ] = Exist `hv` [ B ] `lu` [ [ A ] , [ B ] , [ C ] ]

If there is nowhere to move (no items) - state doesn't change and result is Empty:

> shift `hv'he` Left `hv` [ [ ] , [ A ] , [ B , C ] ] = Empty `hv` Unit `lu` [ [ ] , [ A ] , [ B , C ] ]