Elixir 1.4.0 发布了,Elixir 是一种函数式编程语言,建立在Erlang虚拟机之上。它是一种动态语言,灵活的语法与宏支持,利用Erlang的能力来构建并发、分布式、容错应用程序与热代码升级。 部分更新内容: [Calendar] Add Date.compare/2 , Time.compare/2 , NaiveDateTime.compare/2 and DateTime.compare/2 [Calendar] Support NaiveDateTime.add/3 and NaiveDateTime.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 and Date.day_of_week/1 [Calendar] Ensure Date , Time and NaiveDateTime APIs work with any struct that provides the same set of fields as their respective struct. For example, a NaiveDateTime can be given to Date since it contains a superset of the fields in the Date 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 , and min_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 and Integer.floor_div/2 ……
完整更新内容请查看发行日志 下载地址: |