Go

December 14, 2017

Doumentation Go has well balanced the documentation and code by integrating a powerful eco-system within the tool sets. godoc -http=:8888 offline documentation site godoc fmt Fprintf or godoc builtin append quick terminal check comments prefix as document stub, but no specific requirements for parameters and return value, as go document tool will dynamically parse it from the source code Basics Static Types (Built In) builtin pkg bool string int int8 ... Read more

Elixir Part I - Playbook

November 30, 2017

https://joearms.github.io/published/2013-05-31-a-week-with-elixir.html Pattern Matching equal sign = is not an assignment, is a match operator ^ pin operator forces using existing values Immutable iex(13)> l1 = [1,2,3] [1, 2, 3] iex(14)> l2 = [ l1 | 'a'] [[1, 2, 3], 97] iex(16)> l2 = [ 'a'| l1] ['a', 1, 2, 3] Basics Value Types iex(23)> 0o3407 1799 iex(24)> 0b111100 60 iex(25)> 0x33ff 13311 iex(28)> :var@2 :var@2 iex(29)> 1..100 1..100 iex> Regex. ... Read more

© 2018 | 朱曉清 | powered by Hugo