Skip to content

Using the Set type

CodingUnit edited this page Nov 30, 2011 · 7 revisions

Using the Set type

  • Category: Data Types

  • Description: Create a set of particular unicode characters using a Nemerle.Collections.Set.

  • Code:

 using Nemerle.Collections; 
 using System; 
 using System.Console;

	def SampleSet1() 
	{
		def data = "The big black bird flying over the moon";
		def set = Set().ReplaceRange(data);
		forech (x in set)
		WriteLine($"Char : '$x'")
	}

SampleSet1() 
  • Execution Result:
Char : ’’ 
Char : ’T’ 
Char : ’a’ 
Char : ’b’ 
Char : ’c’ 
Char : ’d’ 
Char : ’e’ 
Char : ’f’ 
Char : ’g’ 
Char : ’h’ 
Char : ’i’ 
Char : ’k’
Char : ’l’ 
Char : ’m’ 
Char : ’n’ 
Char : ’o’ 
Char : ’r’ 
Char : ’t’ 
Char : ’v’ 
Char : ’y’ 

  • Copyright

Samples used from “F# 3.0 Sample Pack” (http://fsharp3sample.codeplex.com/) at Codeplex OpenSource Community for non-commercial usage. All copyrights and authorship on materials this publication based on, is belongs to Microsoft corp. Copyright © 2006-2011 Microsoft Corporation, . All rights reserved. Copyright and autorship for materials in Nemerle language belongs to Nemerle Project Team. Copyright © 2008-2011 Nemerle Project Team. All rights reserved.

Clone this wiki locally