unisonweb / base_v1

Unison base libraries, published using V1 codebase format
24 stars 14 forks source link

Optional helpers + Search {elem, notElem, indexOf} #19

Closed pete-ts closed 4 years ago

pete-ts commented 4 years ago

Overview

This PR adds:

All functions added should have doc, author, license linked, as well as unit tests.

Code review

The changes summarized below are available for you to review, using the following command:

pull-request.load https://github.com/unisonweb/base https://github.com/pete-ts/base:.prs.elemNotElemIndexOf

Added definitions:

 Optional.isNone                : Optional a -> Boolean (+3 metadata)
 Optional.isNone.doc            : Doc
 Optional.isSome                : Optional a -> Boolean (+3 metadata)
 Optional.isSome.doc            : Doc
 Search.elem                    : a -> [a] -> Boolean (+3 metadata)
 Search.elem.doc                : Doc
 Search.elem.tests.negative1    : [Result] (+1 metadata)
 Search.elem.tests.negative2    : [Result] (+1 metadata)
 Search.elem.tests.negative3    : [Result] (+1 metadata)
 Search.elem.tests.positive1    : [Result] (+1 metadata)
 Search.elem.tests.positive2    : [Result] (+1 metadata)
 Search.elem.tests.positive3    : [Result] (+1 metadata)
 Search.indexOf                 : a -> [a] -> Optional Nat (+3 metadata)
 Search.indexOf.doc             : Doc
 Search.indexOf.tests.negative1 : [Result] (+1 metadata)
 Search.indexOf.tests.negative2 : [Result] (+1 metadata)
 Search.indexOf.tests.negative3 : [Result] (+1 metadata)
 Search.indexOf.tests.positive1 : [Result] (+1 metadata)
 Search.indexOf.tests.positive2 : [Result] (+1 metadata)
 Search.indexOf.tests.positive3 : [Result] (+1 metadata)
 Search.notElem                 : a -> [a] -> Boolean (+3 metadata)
 Search.notElem.doc             : Doc

 patch Search.patch (added 7 updates)
pete-ts commented 4 years ago

"I agree to license all the definitions listed in this PR with the MIT license"

pchiusano commented 4 years ago

Optional.isNone/isSome is in 5fcae0a9, Unison namespace hash: v6el9et16uo5sr8h

runarorama commented 4 years ago

Fixed up and merged in base hash #ggig63gmq5. Thanks, @pete-ts!! πŸ¦„ 🌈 🌡