- The performance of
string.trim
,string.trim_start
, andstring.trim_end
has been improved on JavaScript. - The
base64_encode
,base64_url_encode
, andbase16_encode
functions in thebit_array
module no longer throw an exception when called with a bit array which is not a whole number of bytes. Instead, the bit array is now padded with zero bits prior to being encoded. - The
bit_array
module gains thepad_to_bytes
function. - The
bytes_tree
module now pads unaligned bit arrays with zeros when they are added to the tree.
- The
gleam/queue
module has been deprecated in favour of thegleam_deque
package. - The
gleam/iterator
module has been deprecated in favour of thegleam_yielder
package. - The
gleam/regex
module has been deprecated in favour of thegleam_regexp
package.
BytesBuilder
is now an alias ofBytesTree
.StringBuilder
is now an alias ofStringTree
.
- The
bit_array
module gains thebit_size
andstarts_with
functions. - Ths
string
module gains thedrop_start
,drop_end
,pad_start
,pad_end
,trim_start
, andtrim_end
functions. These replace thedrop_left
,drop_right
,pad_left
,pad_right
,trim_left
, andtrim_right
functions, which have been deprecated. - The
result.nil_error
function has been deprecated in favour ofresult.replace_error
. - The
gleam/bytes_builder
module has been deprecated in favour of thegleam/bytes_tree
module. - The
gleam/string_builder
module has been deprecated in favour of thegleam/string_tree
module.
Happy Samhain! π
- The
bit_array
module gains thecompare
function. - The
float
module gains theto_precision
function. - The
iterator.try_fold
function is now tail recursive. - The performance of many functions in the
string
module has been improved. - The
list.concat
function has been deprecated in favour oflist.flatten
. - The handling of float exponentials and signs in the
float.to_string
andstring.inspect
functions have been improved on JavaScript. - The
set
module gains theeach
function.
- The
function.curry*
andfunction.apply*
functions have been deprecated. - The deprecated
dynamic.unsafe_coerce
function has been removed. - The deprecated
dict.update
function has been removed. - The deprecated
order.max
andorder.min
functions have been removed. - The
float
module gains themodulo
function. - The
uri.origin
function no longer incorrectly has a trailing slash. - The
dynamic.optional_field
decoder no longer treats the value as implicitly optional. It only deals with the presence or absence of the key itself which brings it inline with its documentation. - Fixed a bug where
string.trim
could remove commas on JavaScript. - The
string.pop_grapheme
function has been optimised on Erlang, greatly improving its performance. - The
InvalidBase
error in theint
module has been replaced byNil
. - Fixed a bug where iterating graphemes could crash on older JavaScript runtimes
where the
Intl
API is not supported. - Fixed a bug where the behaviour of
uri.percent_decode
would decode+
as a space on JavaScript. - Fixed a bug where
string.slice
could return invalid values on Erlang.
- Fixed
list.window
entering an endless recursive loop forn
= 0. - The
min
andmax
functions of theorder
module have been deprecated. - The
dict
andset
modules gain theis_empty
function. - The
set
module gains themap
function. - Fixed
string.inspect
not formatting ASCII escape codes on Erlang that could lead to unexpected behavior. Now, all ASCII escape codes less than 32, as well as escape code 127, are converted into\u{xxxx}
syntax, except for common escape codes such as\n
or\r
. - Fixed a bug where
string.inspect
would use the incorrect syntax for unicode escape codes on JavaScript. - The
list
module gains thecount
function. - The
update
function of thedict
module has been deprecated in favour ofupsert
andupdate
will be used with a different signature in future. - The behaviour of the string trim functions is now consistent across targets.
iterator.yield
now yields values without waiting for the next one to become available.- Improved bit array Base64 encoding and decoding speed on JavaScript.
- Fixed a bug where Base64 encoding a bit array larger than ~100KiB would throw an exception on JavaScript.
- Fixed
float.parse
failing to parse exponential notation on JavaScript. - The
regex
module gains thereplace
function.
- The
set
module gains theis_subset
,is_disjoint
, andsymmetric_difference
functions - The
sort
function of thelist
module has been optimised in case it's working on an already sorted list. - The
dict
module gains theeach
function. - The
list
module gains thewrap
function. - The
iterator
module gains thefind_map
function. - Fixed
string.inspect
not formatting the\f
form feed control character correctly on Erlang. dynamic.unsafe_coerce
function has been deprecated.- Fixed
bit_array
slices of slices sometimes being incorrect on JavaScript. - The
dict
module gains thecombine
function. - The deprecated
list.at
,bool.max
, andbool.min
functions has been removed.
- The
order
module gains thebreak_tie
andlazy_break_tie
functions. list.at
has been deprecated as it was misleading and would be commonly misused, resulting in poor code.list.LengthMismatch
has been removed.- The mistakenly public
bit_array.do_inspect
function has been removed. - Fixed the
dynamic.classification
function for bools. - The
min
function in thebool
module has been deprecated in favour ofbool.and
. - The
max
function in thebool
module has been deprecated in favour ofbool.or
. - Fixed a bug with
regex.split
where it could includeNil
elements in the returned list of strings on the JavaScript target when the expression to split with included an optional match group which wasn't matched.
- Fixed a bug where on JavaScript the
dynamic.field
function could crash when givennull
. - The
compose
andconstant
functions in thefunction
module have been deprecated in favour of thefn
literal syntax.
- Fixed a warning on the JavaScript target.
- The
bit_array
module gains theinspect
function. - The base 64 encoding and decoding functions in the
bit_array
module no longer insert newlines in the output on JavaScript, making them consistent with the Erlang target. - The
set
module gains thedifference
function. - The deprecated
bit_string
,bit_builder
,base
, andmap
modules have been removed. - The deprecated
map
, andbit_string
functions in thedynamic
module have been removed.
- The
int.random
function now takes a single argument. - The
float.random
function no longer takes any arguments. - Changed
list.index_map
callback signature tofn(a, Int) -> b
fromfn(Int, a) -> b
, to be consistent withlist.index_fold
. - Changed
iterator.index
to returnIterator(#(a, Int))
instead ofIterator(#(Int, a))
.
- Fixed
string.to_graphemes
failing on JavaScript runtimes when theIntl.Segmenter
class is not available.
- The
bool
module gains thelazy_guard
function. - The
gleam/map
module has been deprecated in favour of thegleam/dict
module. - The
map
function in thegleam/dynamic
module has been deprecated in favour of thedict
function.
- The printing of maps by
string.inspect
has been improved.
- The
set.filter
labelfor
was renamed tokeeping
. - The
map.filter
labelfor
was renamed tokeeping
. - The
iterator.filter
labelfor
was renamed tokeeping
. - The
list.filter
labelfor
was renamed tokeeping
. - Updated for Gleam v0.32.0 syntax.
- The
base
module has been deprecated in favour of the newbit_array
module. - The
bit_string
module has been deprecated in favour of the newbit_array
module. - The
bit_builder
module has been deprecated in favour of the newbytes_builder
module. - The
bit_array
module also contains thebase16_encode
andbase16_decode
functions. - Improved performance of
string.to_graphemes
on JavaScript. - The
iterator
module gains themap2
function. - The
list
module gains thekey_filter
function. - Fixed a bug on target JavaScript where
Map
equality would not be correctly checked for maps of different sizes. - Fixed a bug where non-byte aligned bit arrays would be printed suboptimally by
string.inspect
.
list.flatten
is no longer deprecated and is kept as a synonym oflist.concat
- The
iterator
module gains theconcat
function. - The
int
module gains thebitwise_and
,bitwise_or
,bitwise_exclusive_or
,bitwise_not
,bitwise_shift_left
, andbitwise_shift_right
functions.
- Fixed a bug where
base.decode64
could crash on the Erlang target.
- Updated to Gleam v0.30.0 syntax.
- Atoms are now shown using
atom.create_from_string
when passed tostring.inspect
. - Fixed a bug where
string.inspect
would show atoms as Gleam custom types even when the format is invalid. - The
iterator
module gains theyield
function.
- The
list
module gains thelist.map2
function. reverse
has been renamed tonegate
in theorder
module.- A new
reverse
function is added to theorder
module, which reverses an ordering function. flatten
has been renamed toconcat
in thelist
module. The old name is still available as an alias and is deprecated.
- improve
string.join
andstring.concat
performance on JavaScript target. - The
result
module gains thetry_recover
function. - The
string
module gains thebyte_size
function.
- Fixed a bug on target JavaScript where
regex.check
would not correctly execute while using the same regular expression in consecutive calls. - The
zip
function's second argument in thelist
module gains thewith
label. - The
strict_zip
function's second argument in thelist
module gains thewith
label. - The
pair
module gains thenew
function.
- The
result
module gains thepartition
function. dynamic.tupleN
functions now support lists.
- Fixed a bug where
dynamic.map
would crash when passed the JavaScript values ofnull
orundefined
. - Fixed a bug where
io.debug
would crash when called in a React Native environment.
- The
iterator
module gains theeach
function. - Fixed a bug in maps when running on JavaScript where value membership could be incorrectly stated in some cases.
result.then
is now an alias ofresult.try
; both do the same.- The
list
module gains thetry_each
function. - The
dynamic
module gains theoptional_field
function.
regex.scan
now behaves consistently across both targets when a capture group does not capture anything.- The
Map
type was rewritten as a persistent immutable data structure. This results in drastically improved performance when constructing or updating maps, especially with large maps. - The
all
andany
functions in theiterator
module are now tail recursive.
- The
bool
module gains theguard
function. - Fixed a bug where
io.print
,io.print_error
, andio.print_debug
would useconsole.log
and add"\n"
to the output when running on Deno. - Fixed a bug where
int.floor_divide
would return the wrong result in certain edge-cases. - The
iterator
module gains thelength
function.
- The
prepend
function in thelist
module gains thethis
label. - The
list
module gains thegroup
function. - The
dynamic
module is able to decode simple JavaScript objects to maps. So, the behaviour of thefield
andobject
functions are consistent. - For a given empty list as an argument,
int.product
now returns1
instead of0
, andfloat.product
now returns1.0
instead of0.0
. This mimics the behavior of Elixir'sEnum.product/1
.
- The
dynamic
module gains thedecode1
function. - The
float
module gains theloosely_equals
function. - The
io
module gainsprint_error
andprintln_error
functions for printing to stderr. - The
set
module gains thedrop
function. - The
io.debug
function now prints to stderr instead of stdout when using the Erlang target or running in Node.js (but still usesconsole.log
when running as JavaScript in a browser) - The
iterator
module gains thetransform
function. - The
list.at
function now returnsError(Nil)
if given index is smaller than zero, instead of returning the first element. - Fixed a bug where some string functions would incorrectly handle newlines when
iterating over graphemes in older JavaScript environments that do not have the
Intl.Segmenter
class. - The
string
module gainsto_utf_codepoints
,from_utf_codepoints
, andutf_codepoint_to_int
functions. - Fixed
string.inspect
's escaping of"
,\
,\n
,\r
,\r\n
, and\t
, which in turn fixesio.debug
's output of such strings. - The
bit_string
function in thedynamic
module now knows how to handle JavaScriptUint8Array
s.
- The
bool
module gains theand
andor
functions. - The
float
module gains theadd
,subtract
andmultiply
functions. - The
int
module gains theadd
,subtract
andmultiply
functions. - Fixed a bug where
list.permutations
would not correctly permutate lists with non-unique item values. - For
regexp.compile
unicode character properties are now used when resolving\B
,\b
,\D
,\d
,\S
,\s
,\W
, and\w
on target Erlang. list.sort
is now tail recursive and will no longer exceed the stack size on large inputs on target JavaScript.list.sort
is now a "stable" sort, meaning elements which are equal in regards to the given comparison function will keep their previous order.- Added functions
function.apply1
throughfunction.apply3
which help working with functions in pipelines. - Fixed a bug where
regex.scan
would not work correctly on utf8. - The performance of
list.flatten
has been greatly improved. - The
string_builder
module gains thejoin
function. - The
list
module gains theshuffle
function. string.split
will now return a list of graphemes if split on an empty string (""
).
string.slice
is now tail recursive and will no longer exceed the stack size on large inputs on target JavaScript.- Added
int.remainder
andint.modulo
functions which allow safe remainder and modulo operations the way common languages support them. - Added
int.floor_divide
to complement the truncatedint.divide
.
- Fixed
string.inspect
andio.debug
crashing on improper Erlang lists (#333).
- Removed a duplicate import.
- The list dynamic decoding functions can now decode JavaScript arrays into Gleam lists.
list.range
is now tail recursive and will not blow the stack with large ranges when compiled to JavaScript.- Fixed a bug where the
list
module'scontains
,any
, andall
could exhaust the stack when compiling to JavaScript. list.range
anditerator.range
return values are now inclusive of both start and end bounds.
- Fixed a bug where
big_string.concat
could crash. - The
bit_builder
module gains thefrom_bit_strings
function. - Changed
list.contains
,list.any
,list.all
so that Gleam can do tail call optimization which fixes stack size crashes on Firefox, Chrome and NodeJS (#322).
- The
float
module gains thedivide
function. - The
int
module gains thedivide
,power
, andsquare_root
functions. - The
string
module gains thefirst
,last
,capitalise
andinspect
functions. - Fixed a bug where
string_builder.reverse
would break utf8 strings on target JavaScript. - Fixed a bug where
string.reverse
would break utf8 strings on target JavaScript. - Fixed a bug where
string.slice
would break utf8 strings on target JavaScript. - The
string_builder
module loses thefrom_float
function. Usefloat.to_string
instead. - Fixed the
int.power
andfloat.power
functions by properly handling error cases. - The grapheme iterator used by
string.graphemes
is now locale independent on target JavaScript. - Unified
io.debug
to yield Gleam syntax to standard output (stdout) not just on JavaScript but also Erlang.
- Fixed a bug where record-based map keys would clash in JavaScript.
- The
eunit
Erlang headers are no longer required to compile this package. - Fixed a bug where the
string.length
function would cause a JavaScript error for empty strings on older JavaScript runtimes. - The
bool
module gains theto_string
function. - The
function
module gains thetap
function. - The
float
module gains therandom
function. - The
int
module gains therandom
function. - The JavaScript target implementation of the
string.replace
received a bug fix. - The
list
module gains aprepend
function (#284).
- The
dynamic
module gains thedecode9
function. - The
float
module gains theloosely_compare
function. - The
string_builder
module gains thenew
function. - The
bit_builder
module gains thenew
function. - The
result
module gains thereplace
,unwrap_both
andunwrap_error
functions.
- Fixed a bug where
io.print
andio.println
may print unicode characters incorrectly. - Fixed a bug where the
dynamic.field
function would return an incorrect error value.
- The
dynamic.dynamic
function is is no longer a thunk.
- The
dynamic.dynamic
function now returns a result. - The
dynamic.map
function is now curried and requires the decoders for keys and values to be supplied. - The
dynamic.result
,dynamic.optional
,dynamic.field
, anddynamic.list
functions are now partially applied.
- The
dynamic
module gains thedynamic
function. - The shallow
dynamic.list
function has been renamed todynamic.shallow_list
. - The shallow
result
, andtuple*
functions have been removed from thedynamic
module. - The
dynamic.typed_list
function has been renamed todynamic.list
. - The
dynamic.typed_result
function has been renamed todynamic.result
. - The
dynamic.any
is now available on JavaScript. - The
dynamic.typed_tuple*
functions have been renamed todynamic.tuple*
. - The
dynamic.field
anddynamic.element
functions now requires the type of the field to be specified. - The
dynamic.DecodeError
now has apath
field. - The decoder functions of the
dynamic
module now return multiple errors. - The
dynamic.any
,dynamic.element
anddynamic.tuple*
functions are now partially applied. - The
dynamic
module gains thedecode2
,decode3
,decode4
,decode5
,decode6
,decode7
, anddecode8
functions. - The
int
module gains thedigits
andundigits
functions. - The
option
module gains thelazy_or
andlazy_unwrap
functions.
- The
function
module gains theconstant
function. - The internal
gleam_stdlib.js
module has been renamed togleam_stdlib.mjs
.
- Converted to use the Gleam build tool, not rebar3.
- The
iterator
module gains thefirst
andat
functions. - The
list
module renames thehead
andtail
functions tofirst
andrest
. - The
list.at
function now behaves uniformly toiterator.at
. int.to_base_string
now returns aResult(Int, InvalidBase)
.- The
int
module gains theto_base2
,to_base8
,to_base16
andto_base36
functions.
uri.parse
now returns a result.
- All modules have been updated to work on JavaScript as well as Erlang.
- The
bit_string
module gains theconcat
function and has thepart
function renamed toslice
. - The
os
module has been removed in favour of target specific libraries. - The
rescue
function has been removed from thefunction
library in favour of target specific versions in Erlang and JavaScript specific libraries. - The
map.update
function now usesOption
rather thanResult
. - The
iterator
module gains thefold_until
andtry_fold
functions. - The
bit_string
module loses the u32 functions in favour of bit string literals. - The
dynamic
module loses theatom
function and gains theclassify
function. - The
dynamic.option
function has been renamed tooptional
and made more permissive to other null values. - The
dynamic.result
function has been made more permissive to other result values. - The
dynamic.thunk
function has been removed. - The
dynamic.element
labelposition
was renamed toget
. - The
dynamic.element
now accepts negative indexes. - The
io.get_line
function has been moved to thegleam_erlang
library. - The
atom
module has been moved to thegleam_erlang
library. - Prelude types like
Result
,List
etc. are no longer redefined in their stdlib modules. - The
dynamic
module functions now return structured error values instead of a string error description. - The
string
module gains theto_option
function. - Fixed a bug where
io.print
could crash when printing special characters. - The
regex.Match
record no longer has thebyte_index
field any more. - The
should
module has been moved to thegleam_should_assertions
package. - The
uri.percent_encode
function has a slightly different behaviour. For example spaces are encoded as%20
, not as+
. - The order of the arguments of the the function accepted by the
list.map_fold
,list.fold
,list.fold_right
,list.index_fold
,list.try_fold
,list.fold_until
,list.reduce
,list.scan
,map.fold
,set.fold
,iterator.fold
,iterator.scan
,iterator.reduce
,iterator.fold_until
, anditerator.try_fold
have been flipped.
- The
list
module gains theinterleave
,flat_map
andtranspose
functions. - The
option
module gains theall
andvalues
functions. - The
os
module now uses unicode to encode/decode environment variables. This fixes an issue when non-latin characters are present in environment. - The
result
module gains thevalues
function. - All modules now use the new
#(a, b, ...)
tuple syntax.
- The
list.split_while
function's second argument now has the labelsatisfying
to match the other_while
functions inlist
anditerator
. - The
dynamic
module gains thetuple3
,tuple4
,tuple5
,tuple6
functions and their typed equivalentstyped_tuple3
,typed_tuple4
,typed_tuple5
,typed_tuple6
. - The
list
module gains thecombinations
,combination_pairs
,drop_while
,map_fold
,take_while
,reduce
,chunk
,sized_chunk
,last
andscan
functions. - The
iterator
module gains theindex
,iterate
,zip
,scan
,last
,take_while
,drop_while
,chunk
,sized_chunk
,intersperse
,interleave
,reduce
,any
,all
,empty
,once
andsingle
functions. - Breaking change in
iterator.take
. Now it returns an iterator instead of a list. - The
string
module gains thecrop
function.
- The
list
modules gains thefold_until
,window
, andwindow_by_2
functions. - The
int
module gains theclamp
function. - The
float
module gains theclamp
function. - The
io
module gains theget_line
function.
- The
int
module gains theabsolute_value
,sum
andproduct
functions. - The
float
module gains thesum
andproduct
functions. - The
result
module gains thelazy_or
,lazy_unwrap
, andreplace_error
functions. - The
bool
module gains thenand
,nor
,exclusive_nor
, andexclusive_or
functions. - The
bit_builder
module gains thefrom_string_builder
function. - The
list
modules gains theindex_fold
,permutations
, andtry_fold
functions. - Breaking change in
queue.from_list
. The head element in the list becomes the first element in the queue. - Fix
queue.pop_back
andqueue.pop_front
- The
function
module gainscurry2
tocurry6
. - The
list
module gains theeach
, andpartition
functions. - The
int
andfloat
modules gain thenegate
function. - The
int
module gains theto_float
function. - The
result
module gains theall
function. - The
dynamic
module gains theoption
,result
andtyped_result
functions. - The
uri
module gains thepercent_encode
andpercent_decode
functions. - The
os
module gains theerlang_timestamp
function. - The
iterator
module gains theappend
,flatten
,flat_map
,step
, andfind
functions.
- Fix
uri.parse_query
to handle the case where query parameters are present without a value. - The types for
list.find_map
have been relaxed. - The
dynamic.typed_list
argument label has changed fromcontaining
toof
. - The
dynamic
module gains theany
function. - The
bit_builder
module gains thefrom_string
function. - The
list
module gains thekey_set
andunzip
function. - The
function
module gains therescue
function. - The
float
module gains thepower
,square_root
, andabsolute_value
functions.
- Fix
dynamic.string
to check that binary contains only utf8 characters.
bit_string
module created withfrom_string
,byte_size
,append
,part
,to_string
,is_utf8
,int_to_u32
andint_from_u32
functions.- The
bit_builder
module has been introduced withprepend
,append
,prepend_builder
,append_builder
,prepend_string
,append_string
,concat
,from_bit_string
,to_bit_string
, andbyte_size
functions. - The
iodata
module has been renamed tostring_builder
. os
module created withget_env
,insert_env
,delete_env
andsystem_time
.- The
string
module gains thesplit_once
andutf_codepoint
functions. - The
dynamic
module gains thebit_string
function. - The
uri
module gains theorigin
andmerge
function. - The
io.debug
function returns the printed term. - The
dynamic.list
function has been renamed todynamic.typed_list
. - The
dynamic.opaque_list
function has been renamed todynamic.list
. - The
dynamic.tuple2_of
function has been renamed todynamic.typed_tuple2
. - The
list.traverse
function has been renamed tolist.try_map
. - The
list.traverse
first argument gains the labelover
. - The
option
module gains the themap
,flatten
,then
andor
functions. - The
result
module gains the theor
function. - Created the
regex
module with thefrom_string
,compile
,check
,split
andscan
functions. - The
list
module gains the thepop
,pop_map
andkey_pop
functions. base
module created withencode64
,decode64
,url_encode64
andurl_decode64
.
- Created the
iterator
module with theunfold
,repeatedly
,repeat
,from_list
,fold
,run
,to_list
,take
,drop
,map
,filter
,cycle
, andrange
functions. - Created the
set
module with thenew
,insert
,delete
,to_list
,from_list
,fold
,take
,union
,intersection
, andcontains
functions. - Created the
io
module with theprint
,println
, anddebug
functions. - Created the
queue
module with thenew
,from_list
,to_list
,is_empty
,length
,push_back
,push_front
,pop_back
,pop_front
,reverse
,is_logically_equal
, andis_equal
functions. - Created the
option
module containing theOption
type and theis_some
andis_none
functions. - Created the
option
module containing theOption
type and theis_some
,is_none
,to_result
,from_result
andunwrap
functions. - Removed the
Option
alias and thenone
function from theresult
module. - The
result
module gains thenil_error
function. - The
string
module gainstrim
,trim_left
,trim_right
,starts_with
,ends_with
,slice
,pad_left
,pad_right
drop_left
,drop_right
,pop_grapheme
andto_graphemes
functions. uri
module created withparse
,parse_query
,path_segments
,query_to_string
andto_string
.- The
dynamic
module gains themap
,opaque_list
,tuple2
, andtuple2_of
functions. - The
list
module gains thefilter_map
function. - The
list.contains
labelhas
has been changed toany
. - The
list.sort
labelsort_by
has been changed toby
. - The
list.fold
's first argument gained the labelover
. - The
map.fold
's first argument gained the labelover
. - The
map.take
'sdrop
argument has been changed tokeeping
.
- The error type for
atom.from_string
has been renamed toFromStringError
. - The
string
module gainscontains
andrepeat
functions. - The
expect
module has been renamed toshould
. Functions in the module starting withis_
have been changed tobe_
. - The
string.replace
andiodata.replace
all
argument label has been changed toeach
. - The
string
module gainsis_empty
,join
andconcat
functions. - The
int
module gainsis_even
andis_odd
functions. - The
list.length
function now accepts a labelled argument. - The
list.length
function now accepts a labelled argument. - The the second argument of
bool.compare
,float.compare
,int.compare
, andorder.compare
now have the labelwith
. - The
dynamic.unsafe_coerce
function now only accepts Dynamic data. - The
dynamic
decoder functions no longer print the entire value in their error messages, to avoid large errors.
- The
result
module gains anOption
type alias. - The
function
module has been created withidentity
,compose
, andflip
functions. - The error type of
list.find_map
is nowNil
. - The labels for
list.split
are nowsplit(list: _, at: _)
.
- Syntax has been updated for Gleam v0.6.0.
- The
dynamic
module gains anelement
for decoding tuples.
- Syntax has been updated for Gleam v0.5.
- Labels have been added to functions throughout the stdlib.
map.fetch
has been renamed tomap.get
andmap.put
tomap.insert
.list.find
has been renamedlist.find_map
and a newlist.find
has been introduced.- The
pair
module gains themap_first
, andmap_second
functions. - The
pair.Pair
type has been replaced with a 2 element anonymous struct. - The
triple
module has been removed. - The
string
module gains thecompare
function. - The
float
module gains themax
, andmin
functions. - The
int
module gains themax
, andmin
functions. - The
Any
type and module have been renamed toDynamic
.
- Syntax has been updated for Gleam v0.4.
- The
map_dict
module has been renamed tomap
. list:sort
now requires a compare function as comparison operators now only work on Ints.list:sort
's performance has been slightly optimised.- The
float
module gains acompare
function. any.tuple
has been renamedany.pair
.- The
tuple
module has been renamed topair
and has aPair
type. pair.fetch
has been replaced withlist.key_find
.triple
module has been created with typeTriple
.- The error type for
float.parse
,int.parse
,list.head
,list.tail
,list.find
,list.at
,map.fetch
, andmap.update
is nowNil
.
result:map_error
has been relaxed to allow mapping to a different error type.
- The
map_dict
module gains afold
function. - All modules moved under the
std
namespace. - The
http
module has been split out into thegleam_http
package.
- Library renamed to
gleam_stdlib
. - The
map_dict
module gainsupdate
,merge
anddelete
functions. - The
bool
module gains acompare
function. - The
int
module gains acompare
function. - The
list
module gainsrange
,repeat
,split
,split_while
andstrict_zip
functions.
- The
list
module gainsat
,all
,any
,index_map
,intersperse
,sort
,unique
, andzip
functions. map_dict:Map
renamed tomap_dict:MapDict
.- The
map_dict
module gainsdrop
, andtake
functions. - The
str
module gainsappend
function and losesfrom_int
,parse_int
,from_float
,parse_float
, andbase_from_int
. int
module created withparse
,to_string
, andto_base_string
.float
module created withceiling
,floor
,round
,truncate
,parse
, andto_string
.
- Included missing gleam.toml in hex package.
- Initial release!