Skip to content

Instantly share code, notes, and snippets.

-module(hexlify_sample).
-export([hexlify/1]).
-define(TOHEX(X),
begin
<<X1:1, X2:1, X3:1, _:1>> = <<X:4>>,
TenF = X1 band X2 bor X1 band bnot X2 band X3,
X + (1 - TenF) * $0 + TenF * ($A - 10)
end).
sudo ./configure --enable-multibyte --with-features=huge --disable-selinux --prefix=/usr/local --enable-luainterp=yes --with-lua-prefix=/usr --enable-pythoninterp
@KOUCHANG
KOUCHANG / file0.erl
Last active August 29, 2015 14:02
Erlangの andalso は第2引数が boolean() じゃなくても良い ref: http://qiita.com/KOU_CHANG/items/a5c6bc7177976a8d8640
1> true andalso false.
false
2> true andalso ok.
ok
3> false orelse true.
true
4> false orelse ok.
ok