.\" This man page is automatically generated using .\" kayadoc2man from the Kaya development tools and the -xmldocs compile .\" option. Editing it directly is not encouraged. .\" It is under the same license as the source .k file that it was .\" generated from. .TH "Array.nub" "3kaya" "August 2014" "Kaya" "Kaya module reference" .SH "NAME" Array::nub \- Remove repeated elements from a list. .SH "SYNOPSIS" .B Void nub( \fIvar [a] xs, Bool(a, a) eq=equal\fP .B ")" .SH "ARGUMENTS" .PP .B "xs" The list .PP .B "eq" Optionally, the equality test. Defaults to .B "Builtins.equal"(3kaya) .SH "DESCRIPTION" .PP Remove repeated elements from a list in-place. Repeated elements will be removed whether adjacent or not. .IP "" -4 xs = [1,2,3,3,1,2,4,5,2,2,1]; nub(xs); // xs = [1,2,3,4,5] .PP The name 'nub', incidentally, is borrowed from the Haskell prelude function of the same name, and suggests 'essence'. .SH "AUTHORS" Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/ .SH LICENSE The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.