aboutsummaryrefslogtreecommitdiffstats
path: root/lib/gs/contribs/cols/cols.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2011-09-16 17:05:46 +0200
committerBjörn-Egil Dahlberg <[email protected]>2011-09-16 17:05:46 +0200
commit2c79dee4b4f2a0a692cdf28399fc069eca18f07a (patch)
tree9d8ded2e9a49a6b59d4f7348a7a75123f0cbe5d0 /lib/gs/contribs/cols/cols.erl
parent211389b07fed7ac2bc1d7f713f0b42dc93cf615c (diff)
downloadotp-2c79dee4b4f2a0a692cdf28399fc069eca18f07a.tar.gz
otp-2c79dee4b4f2a0a692cdf28399fc069eca18f07a.tar.bz2
otp-2c79dee4b4f2a0a692cdf28399fc069eca18f07a.zip
gs: Update to modern type guards in examples
Diffstat (limited to 'lib/gs/contribs/cols/cols.erl')
-rw-r--r--lib/gs/contribs/cols/cols.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gs/contribs/cols/cols.erl b/lib/gs/contribs/cols/cols.erl
index 67b46d0dfb..439eb717f7 100644
--- a/lib/gs/contribs/cols/cols.erl
+++ b/lib/gs/contribs/cols/cols.erl
@@ -278,7 +278,7 @@ fall_column([], _X, _Y, ColumnAcc, ChecksAcc) ->
fall_column([black|Colors], X, Y, ColumnAcc, ChecksAcc) ->
case find_box(Colors) of
false -> {ColumnAcc, ChecksAcc};
- NewColors when list(NewColors) ->
+ NewColors when is_list(NewColors) ->
fall_one_step(NewColors, X, Y, ColumnAcc, ChecksAcc)
end;
fall_column([Color|Colors], X, Y, ColumnAcc, ChecksAcc) ->
@@ -330,7 +330,7 @@ new_column_list([], _, _) -> [].
%%----------------------------------------------------------------------
%% Returns: a reversed list of colors.
%%----------------------------------------------------------------------
-columntuple_to_list(ColumnTuple) when tuple(ColumnTuple) ->
+columntuple_to_list(ColumnTuple) when is_tuple(ColumnTuple) ->
columntuple_to_list(tuple_to_list(ColumnTuple),[]).
columntuple_to_list([],Acc) -> Acc;