-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
61 additions
and
58 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
exports.empty = function() { | ||
return new Set() | ||
} | ||
|
||
exports._delete = function(value, set) { | ||
set.delete(value) | ||
} | ||
|
||
exports._add = function(value, set) { | ||
set.add(value) | ||
} | ||
|
||
exports._size = function(set) { | ||
return set.size | ||
} | ||
|
||
exports._has = function(value, set) { | ||
return set.has(value) | ||
} | ||
|
||
exports._toArray = function(set) { | ||
return Array.from(set) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module Halogen.VDom.JsSet where | ||
|
||
import Prelude | ||
|
||
import Effect (Effect) | ||
import Effect.Uncurried (EffectFn1, EffectFn2) as EFn | ||
|
||
data JsSet a | ||
|
||
foreign import empty ∷ ∀ a . Effect (JsSet a) | ||
|
||
foreign import _delete ∷ ∀ a . EFn.EffectFn2 a (JsSet a) Unit | ||
|
||
foreign import _add ∷ ∀ a . EFn.EffectFn2 a (JsSet a) Unit | ||
|
||
foreign import _size ∷ ∀ a . EFn.EffectFn1 (JsSet a) Int | ||
|
||
foreign import _has ∷ ∀ a . EFn.EffectFn2 a (JsSet a) Boolean | ||
|
||
foreign import _toArray ∷ ∀ a . EFn.EffectFn1 (JsSet a) (Array a) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.