Liking cljdoc? Tell your friends :D

emlyn.grid.impl


*index-mode*clj

How to handle indices outside the usual bounds. Valid values are:

  • :strict (default): no special handling of indices
  • :wrap: indices wrap around the edges of the grid
  • :clamp: indices clamp to the edges of the grid
  • :python: negative indices count from the end of the grid Indices that still fall outside the grid after this handling will throw an exception if you try to set (e.g. assoc) them, and will return the default value (or nil) when you read them.
How to handle indices outside the usual bounds. Valid values are:
- `:strict` (default): no special handling of indices
- `:wrap`: indices wrap around the edges of the grid
- `:clamp`: indices clamp to the edges of the grid
- `:python`: negative indices count from the end of the grid
Indices that still fall outside the grid after this handling will
throw an exception if you try to set (e.g. `assoc`) them,
and will return the default value (or `nil`) when you read them.
sourceraw docstring

gridclj

(grid data)
(grid w h & [data])

Construct a grid.

Construct a grid.
sourceraw docstring

heightclj

(height grid)

The height of a grid in cells.

The height of a grid in cells.
sourceraw docstring

set-index-mode!clj

(set-index-mode! mode)
source

shape->keysclj

(shape->keys [w h])

Get the keys of a grid.

Get the keys of a grid.
sourceraw docstring

slice->rangeclj

(slice->range limit)
(slice->range _ v)
(slice->range _ lo hi)
source

widthclj

(width grid)

The width of a grid in cells.

The width of a grid in cells.
sourceraw docstring

with-index-modecljmacro

(with-index-mode mode & body)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close