Comments (5)
slice
isn't exported because you can give it nonsensical arguments like slice(5, 1)
, the preferred approach is drop
then take
, although admittedly that has more of a performance penalty.
from purescript-arrays.
What do you think about exporting slice with bounds check?
2015-01-06 11:40 GMT+01:00 Gary Burgess [email protected]:
slice isn't exported because you can give it nonsensical arguments like slice(5,
1), the preferred approach is drop then take, although admittedly that
has more of a performance penalty.—
Reply to this email directly or view it on GitHub
#21 (comment)
.
from purescript-arrays.
And as well we have an Unsafe module, maybe it is possible to add slice without bounds check their? For the implementation of vector and matrix the drop and take interface is nonsense.
from purescript-arrays.
Yeah, making it available via Unsafe
seems sensible to me.
from purescript-arrays.
What about STArray
?
from purescript-arrays.
Related Issues (20)
- Move unsafeFreeze and unsafeThaw to Data.Array.ST.Unsafe HOT 4
- Rename empty to new in Data.Array.ST HOT 2
- Use Ord by default for all set-like operations HOT 25
- Restore stability for sorting HOT 3
- Enable user to specify which sorting algorithms to use when sorting. HOT 2
- Add `STA.foreachWithIndex`
- Add `Array`-specific version of `Data.Foldable.intercalate` if it's faster upon benchmarking
- Add API: sliding and slidingSizeStep HOT 4
- Consistency for Eq a / Ord a functions with suffix "By" HOT 3
- question about Lazy => some HOT 3
- Deprecate `nub` and rename to `removeDuplicates` HOT 7
- transpose? HOT 16
- Add transpose to NonEmptyArray HOT 8
- `groupBy` has unexpected `l` argument for `a -> a -> Boolean` predicate HOT 3
- `mapWithIndex` should reuse `Data.FunctorWithIndex.mapWithIndexArray` HOT 3
- Implement `STArray.push` via proper FFI
- Data.ST.Array.length HOT 2
- Does Array.index need to be a foreign import?
- deleteWith function & friends HOT 2
- generate function HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purescript-arrays.