Skip to content
This repository was archived by the owner on Oct 4, 2020. It is now read-only.

Conversation

@safareli
Copy link
Contributor

-- | data in the specified range of bytes of the source Blob, by setting .
slice MediaType -> StartByte -> EndByte -> Blob -> Blob
slice mediaType (StartByte start) (EndByte end) blob =
_slice blob start end (unwrap mediaType)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could just make this the FFI function directly - there's no need to unwrap any of the newtypes since they have no runtime representation.

Would just need to rearrange the FFI function's argument to match the ones we want :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's awesome!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😆

@garyb garyb merged commit 8b703ee into purescript-deprecated:master Sep 27, 2017
@safareli safareli deleted the blob branch September 27, 2017 20:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add slice for Blob

2 participants