Skip to content

Commit 33e7ab9

Browse files
authored
Merge pull request #6 from wnuqui/docs/fixes
Typos and reformatting
2 parents b00bcfa + ec00ab1 commit 33e7ab9

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import Presence
2727
```
2828
to the top of the module where you will be working with Presence module. We `import` to easily access functions from modules implementing `Presence` protocol without using the fully-qualified name.
2929

30-
These functions are `is_blank/1`, `is_present`, `presence`
30+
These functions are `is_blank/1`, `is_present/1`, `presence/1`
3131

3232
Few examples below:
3333

@@ -64,15 +64,15 @@ nil
6464
## Current Implementation
6565

6666
Presence is a Protocol that is currently implemented by the following:
67-
* Atom
68-
* List
69-
* BitString
70-
* Map
71-
* Tuple
67+
- `Atom`
68+
- `BitString`
69+
- `List`
70+
- `Map`
71+
- `Tuple`
7272

7373
Other modules can implement the Protocol by defining these functions:
7474
- `is_blank/1`
75-
- `is_preent/1`
75+
- `is_present/1`
7676
- `presence/1`
7777

7878
## Inspiration

lib/presence.ex

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ defprotocol Presence do
1111
Currently, these modules implements `Presence` protocol.
1212
1313
- `Atom`
14-
- `List`
1514
- `BitString`
15+
- `List`
1616
- `Map`
1717
- `Tuple`
1818
@@ -22,13 +22,13 @@ defprotocol Presence do
2222
A value is blank if it's nil, false, empty, or a whitespace string.
2323
2424
For example
25-
- `false`
26-
- `''`
27-
- `' '`
2825
- `nil`
26+
- `false`
2927
- `[]`
3028
- `%{}`
3129
- `{}`
30+
- `''`
31+
- `' '`
3232
3333
are all blank.
3434
@@ -122,7 +122,7 @@ defprotocol Presence do
122122
123123
becomes
124124
125-
region = state.presence || country.presence || 'US'
125+
region = presence(state) || presence(country) || 'US'
126126
127127
"""
128128
def presence(value)

0 commit comments

Comments
 (0)