@@ -48,9 +48,9 @@ defmodule Remixdb.List do
4848 ## Returns
4949 - `{:ok, pid}` on success.
5050
51- ## Example
51+ ## Example Usage
5252
53- Remixdb.List.start_link(:ok)
53+ iex> Remixdb.List.start_link(:ok)
5454 """
5555 def start_link ( _args ) do
5656 GenServer . start_link ( __MODULE__ , :ok , name: @ name )
@@ -66,9 +66,9 @@ defmodule Remixdb.List do
6666 ## Returns
6767 - `:ok` on success.
6868
69- ## Example
69+ ## Example Usage
7070
71- Remixdb.List.flushall()
71+ iex> Remixdb.List.flushall()
7272 :ok
7373 """
7474 def flushall ( ) do
@@ -81,9 +81,9 @@ defmodule Remixdb.List do
8181 ## Returns
8282 - The size of the database as an integer.
8383
84- ## Example
84+ ## Example Usage
8585
86- Remixdb.List.dbsize()
86+ iex> Remixdb.List.dbsize()
8787 2
8888 """
8989 def dbsize ( ) do
@@ -99,9 +99,9 @@ defmodule Remixdb.List do
9999 ## Returns
100100 - The number of elements in the list.
101101
102- ## Example
102+ ## Example Usage
103103
104- Remixdb.List.llen("mylist")
104+ iex> Remixdb.List.llen("mylist")
105105 3
106106 """
107107 def llen ( list_name ) do
@@ -119,9 +119,9 @@ defmodule Remixdb.List do
119119 ## Returns
120120 - A list of elements in the specified range.
121121
122- ## Example
122+ ## Example Usage
123123
124- Remixdb.List.lrange("mylist", 0, -1)
124+ iex> Remixdb.List.lrange("mylist", 0, -1)
125125 ["a", "b", "c"]
126126 """
127127 def lrange ( list_name , start , stop ) do
@@ -139,9 +139,9 @@ defmodule Remixdb.List do
139139 ## Returns
140140 - `:ok` on success.
141141
142- ## Example
142+ ## Example Usage
143143
144- Remixdb.List.ltrim("mylist", 0, 1)
144+ iex> Remixdb.List.ltrim("mylist", 0, 1)
145145 :ok
146146 """
147147 def ltrim ( list_name , start , stop ) do
@@ -160,9 +160,9 @@ defmodule Remixdb.List do
160160 - `:ok` on success.
161161 - `{:error, "ERR index out of range"}` if the index is invalid.
162162
163- ## Example
163+ ## Example Usage
164164
165- Remixdb.List.lset("mylist", 1, "new_value")
165+ iex> Remixdb.List.lset("mylist", 1, "new_value")
166166 :ok
167167 """
168168 def lset ( list_name , idx , val ) when is_integer ( idx ) do
@@ -179,9 +179,9 @@ defmodule Remixdb.List do
179179 ## Returns
180180 - The value at the specified index, or `nil` if the index is invalid.
181181
182- ## Example
182+ ## Example Usage
183183
184- Remixdb.List.lindex("mylist", 1)
184+ iex> Remixdb.List.lindex("mylist", 1)
185185 "b"
186186 """
187187 def lindex ( list_name , idx ) when is_integer ( idx ) do
@@ -203,9 +203,9 @@ defmodule Remixdb.List do
203203 ## Returns
204204 - The new length of the list.
205205
206- ## Example
206+ ## Example Usage
207207
208- Remixdb.List.rpush("mylist", ["d", "e"])
208+ iex> Remixdb.List.rpush("mylist", ["d", "e"])
209209 5
210210 """
211211 def rpush ( list_name , items ) do
@@ -222,9 +222,9 @@ defmodule Remixdb.List do
222222 ## Returns
223223 - The new length of the list, or `0` if the list does not exist.
224224
225- ## Example
225+ ## Example Usage
226226
227- Remixdb.List.rpushx("mylist", ["f"])
227+ iex> Remixdb.List.rpushx("mylist", ["f"])
228228 6
229229 """
230230 def rpushx ( list_name , items ) do
@@ -241,9 +241,9 @@ defmodule Remixdb.List do
241241 ## Returns
242242 - The new length of the list.
243243
244- ## Example
244+ ## Example Usage
245245
246- Remixdb.List.lpush("mylist", ["x", "y"])
246+ iex> Remixdb.List.lpush("mylist", ["x", "y"])
247247 5
248248 """
249249 def lpush ( list_name , items ) do
@@ -260,9 +260,9 @@ defmodule Remixdb.List do
260260 ## Returns
261261 - The new length of the list, or `0` if the list does not exist.
262262
263- ## Example
263+ ## Example Usage
264264
265- Remixdb.List.lpushx("mylist", ["f"])
265+ iex> Remixdb.List.lpushx("mylist", ["f"])
266266 6
267267 """
268268 def lpushx ( list_name , items ) do
@@ -278,9 +278,9 @@ defmodule Remixdb.List do
278278 ## Returns
279279 - The first element of the list, or `nil` if the list is empty.
280280
281- ## Example
281+ ## Example Usage
282282
283- Remixdb.List.lpop("mylist")
283+ iex> Remixdb.List.lpop("mylist")
284284 "a"
285285 """
286286 def lpop ( list_name ) do
@@ -296,9 +296,9 @@ defmodule Remixdb.List do
296296 ## Returns
297297 - The last element of the list, or `nil` if the list is empty.
298298
299- ## Example
299+ ## Example Usage
300300
301- Remixdb.List.rpop("mylist")
301+ iex> Remixdb.List.rpop("mylist")
302302 "c"
303303 """
304304 def rpop ( list_name ) do
@@ -315,9 +315,9 @@ defmodule Remixdb.List do
315315 ## Returns
316316 - The value moved, or `nil` if the source list is empty.
317317
318- ## Example
318+ ## Example Usage
319319
320- Remixdb.List.rpoplpush("mylist", "anotherlist")
320+ iex> Remixdb.List.rpoplpush("mylist", "anotherlist")
321321 "c"
322322 """
323323 def rpoplpush ( src , dest ) do
@@ -335,9 +335,9 @@ defmodule Remixdb.List do
335335 - `true` if the rename was successful.
336336 - `false` if the old name does not exist.
337337
338- ## Example
338+ ## Example Usage
339339
340- Remixdb.List.rename("mylist", "newlist")
340+ iex> Remixdb.List.rename("mylist", "newlist")
341341 true
342342 """
343343 def rename ( old_name , new_name ) do
0 commit comments