Elixir 1.4.0 发布了,Elixir 是一种函数式编程语言,建立在Erlang虚拟机之上。它是一种动态语言,灵活的语法与宏支持,利用Erlang的能力来构建并发、分布式、容错应用程序与热代码升级。
部分更新内容:
[Calendar] Add
Date.compare/2
,Time.compare/2
,NaiveDateTime.compare/2
andDateTime.compare/2
[Calendar] Support
NaiveDateTime.add/3
andNaiveDateTime.diff/3
for adding seconds (up to microseconds) as well as the difference between two NaiveDateTimes in seconds (up to microseconds)[Calendar] Add
Date.leap_year?/1
andDate.day_of_week/1
[Calendar] Ensure
Date
,Time
andNaiveDateTime
APIs work with any struct that provides the same set of fields as their respective struct. For example, aNaiveDateTime
can be given toDate
since it contains a superset of the fields in theDate
struct[Enum] Add
Enum.map_every/2
that invokes the given function with every nth item[Enum] Add
min/2
,max/2
,min_max/2
,min_by/3
,max_by/3
, andmin_max_by/3
that allow a function specifying the default value when the enumerable is empty[Enum] Introduce
Enum.zip/1
to zip multiple entries at once[Float] Introduce
Float.ratio/1
that returns a tuple with the numerator and denominator as integers to retrieve the given float[GenServer] Log warn on default
handle_info/2
implementation[Inspect] Support syntax coloring via the
:syntax_color
option[Integer]
Integer.digits/2
now accepts negative integers[Integer] Add
Integer.mod/2
andInteger.floor_div/2
……
完整更新内容请查看发行日志
下载地址: