Last active
August 29, 2015 14:05
-
-
Save cartazio/584aad55ef6dc6d21703 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class (Ord (Key table)) => OrderedKV table where | |
type Key table :: * | |
type Value table ::* | |
type Address table :: * | |
keyRange :: table -> (Key table, Key table) | |
key2Address :: table -> (Key table) -> Maybe (Address table) | |
address2Key :: table -> (Address table) -> Key Table | |
nextAddress :: table -> Address table -> Maybe (Address table) | |
nextKey :: table -> Key table -> Maybe (Address table) ->Maybe (Key table, Address table ) | |
sliceTable :: table -> (Address table, Address table) -> Maybe table | |
readTable :: table -> Address table -> Value table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@TranM i think my
key2Address
should have beenkey2Value
. IN these apis,Key
IS the notion of addresspipes makes sense as a way of streaming chunks that you work on locally, but i dont think its teh interface you want for addressing individual items