Skip to content

Commit 13b0fbc

Browse files
Oscar Morantespacepluk
authored andcommitted
add missing method referenced in spec's backport
1 parent 11c33f5 commit 13b0fbc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Clojure/Clojure/Lib/RT.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,17 @@ private static ISeq seqFrom(object coll)
777777
throw new ArgumentException("Don't know how to create ISeq from: " + coll.GetType().FullName);
778778
}
779779

780+
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "can")]
781+
static public bool canSeq(object coll)
782+
{
783+
return coll == null
784+
|| coll is ISeq
785+
|| coll is Seqable
786+
|| coll.GetType().IsArray
787+
|| coll is String
788+
|| coll is IEnumerable;
789+
}
790+
780791
static IEnumerable NullIterator()
781792
{
782793
yield break;

0 commit comments

Comments
 (0)