SlideShare a Scribd company logo
1 of 9
Mutable Data, Lists,
Dictionary
Dictionary
F# - Mutable Dictionary
• You know the System.Collections.Generic.Dictionary type
from C# or VB .NET.
• This acts as a standard lookup collection, allowing fast
retrieval of values based on a unique key.
• The Dictionary<'TKey, 'TValue> class is the mutable
equivalent of the F# map data structure and contains many of
the same functions.
• a special kind of set that associates the values with key.
F# - Mutable Dictionary
1. Creating a dictionary
2. Adding items to the dictionary
3. Removing an item from the dictionary
4. Retrieving an item
5. Trying to access an item that doesn’t exist—
exception is raised
1. Creating a Dictionary
Created new keyword and calling the constructor
open System.Collections.Generic
let dict = new Dictionary<string, string>()
dict.Add("1", "Ronak")
dict.Add("2","Rishita")
dict.Add("3","Robin")
dict.Add("4","Ruchita")
printfn "Dictionary - students: %A" dict
Dictionary - students: seq
[[1, Ronak]; [2, Rishita];
[3, Robin]; [4, Ruchita]]
O/P
Properties
Comparer used to determine equality of keys for the dictionary.
Count Gets the number of key/value pairs
Item Gets or sets the value associated with the specified
key.
Keys Gets a collection containing the keys
Values Gets a collection containing the values
Example: Properties
open System.Collections.Generic
let dict = new Dictionary<string, string>()
dict.Add("1", "Ronak")
dict.Add("2","Rishita")
dict.Add("3","Robin")
dict.Add("4","Ruchita")
printfn "Dictionary - students: %A" dict
printfn "Total Number of Students: %d" dict.Count
printfn "The keys: %A" dict.Keys
printf"The Values: %A" dict.Values
Example: Properties-Output
Dictionary - students: seq
[[1, Ronak]; [2, Rishita]; [3, Robin]; [4, Ruchita]]
Total Number of Students: 4
The keys: seq ["1"; "2"; "3"; "4"]
The Values: seq ["Ronak"; "Rishita"; "Robin"; "Ruchita"]
Methods
Add Adds the specified key and value to the dictionary.
Clear Removes all keys and values
Remove Removes the value with the specified key
ContainsKey Determines whether the Dictionary(TKey, TValue)
contains the specified key.
ContainsValue Determines whether the Dictionary(TKey, TValue)
contains a specific value.
F# - Mutable Dictionary
[<Measure>]
type amu
type Atom = { Name : string; Weight : float<amu> }
open System.Collections.Generic
let periodicTable = new Dictionary<string, Atom>()
periodicTable.Add( "H", { Name = "Hydrogen"; Weight = 1.0079<amu> })
periodicTable.Add("He", { Name = "Helium"; Weight = 4.0026<amu> })
periodicTable.Add("Li", { Name = "Lithium"; Weight = 6.9410<amu> })
periodicTable.Add("Be", { Name = "Beryllium"; Weight = 9.0122<amu> })
periodicTable.Add( "B", { Name = "Boron "; Weight = 10.811<amu> })
printfn "Dictionary - AMU: %A" periodicTable

More Related Content

What's hot

Collections - Lists, Sets
Collections - Lists, Sets Collections - Lists, Sets
Collections - Lists, Sets Hitesh-Java
 
Programming in python Unit-1 Part-1
Programming in python Unit-1 Part-1Programming in python Unit-1 Part-1
Programming in python Unit-1 Part-1Vikram Nandini
 
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...Edureka!
 
Collection Framework in java
Collection Framework in javaCollection Framework in java
Collection Framework in javaCPD INDIA
 
Data and donuts: Data Visualization using R
Data and donuts: Data Visualization using RData and donuts: Data Visualization using R
Data and donuts: Data Visualization using RC. Tobin Magle
 
1018telling story from text 2
1018telling story from text 21018telling story from text 2
1018telling story from text 2Ke Jiang
 
Collections generic
Collections genericCollections generic
Collections genericsandhish
 
Billing Software By Harsh Mathur.
Billing Software By Harsh Mathur.Billing Software By Harsh Mathur.
Billing Software By Harsh Mathur.Harsh Mathur
 
collection framework in java
collection framework in javacollection framework in java
collection framework in javaMANOJ KUMAR
 
SWT Lecture Session 8 - Inference in jena
SWT Lecture Session 8 - Inference in jenaSWT Lecture Session 8 - Inference in jena
SWT Lecture Session 8 - Inference in jenaMariano Rodriguez-Muro
 
Collections Api - Java
Collections Api - JavaCollections Api - Java
Collections Api - JavaDrishti Bhalla
 

What's hot (20)

Intro to Lists
Intro to ListsIntro to Lists
Intro to Lists
 
Collections - Lists, Sets
Collections - Lists, Sets Collections - Lists, Sets
Collections - Lists, Sets
 
Programming in python Unit-1 Part-1
Programming in python Unit-1 Part-1Programming in python Unit-1 Part-1
Programming in python Unit-1 Part-1
 
Java Collections
Java  Collections Java  Collections
Java Collections
 
Generics
GenericsGenerics
Generics
 
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
 
Collection Framework in java
Collection Framework in javaCollection Framework in java
Collection Framework in java
 
Collections (1)
Collections (1)Collections (1)
Collections (1)
 
Collections framework in java
Collections framework in javaCollections framework in java
Collections framework in java
 
Data and donuts: Data Visualization using R
Data and donuts: Data Visualization using RData and donuts: Data Visualization using R
Data and donuts: Data Visualization using R
 
1018telling story from text 2
1018telling story from text 21018telling story from text 2
1018telling story from text 2
 
Java collection
Java collectionJava collection
Java collection
 
Collections generic
Collections genericCollections generic
Collections generic
 
07 java collection
07 java collection07 java collection
07 java collection
 
Billing Software By Harsh Mathur.
Billing Software By Harsh Mathur.Billing Software By Harsh Mathur.
Billing Software By Harsh Mathur.
 
The Chemtools LaBLog
The Chemtools LaBLogThe Chemtools LaBLog
The Chemtools LaBLog
 
collection framework in java
collection framework in javacollection framework in java
collection framework in java
 
Selection sort
Selection sortSelection sort
Selection sort
 
SWT Lecture Session 8 - Inference in jena
SWT Lecture Session 8 - Inference in jenaSWT Lecture Session 8 - Inference in jena
SWT Lecture Session 8 - Inference in jena
 
Collections Api - Java
Collections Api - JavaCollections Api - Java
Collections Api - Java
 

Similar to .net F# mutable dictionay

Similar to .net F# mutable dictionay (20)

Chapter 16 Dictionaries
Chapter 16 DictionariesChapter 16 Dictionaries
Chapter 16 Dictionaries
 
Chapter 14 Dictionary.pptx
Chapter 14 Dictionary.pptxChapter 14 Dictionary.pptx
Chapter 14 Dictionary.pptx
 
Dictionaries and Sets in Python
Dictionaries and Sets in PythonDictionaries and Sets in Python
Dictionaries and Sets in Python
 
Python dictionaries
Python dictionariesPython dictionaries
Python dictionaries
 
Ch_13_Dictionary.pptx
Ch_13_Dictionary.pptxCh_13_Dictionary.pptx
Ch_13_Dictionary.pptx
 
Ch 7 Dictionaries 1.pptx
Ch 7 Dictionaries 1.pptxCh 7 Dictionaries 1.pptx
Ch 7 Dictionaries 1.pptx
 
Collections in Python - Where Data Finds Its Perfect Home.pdf
Collections in Python - Where Data Finds Its Perfect Home.pdfCollections in Python - Where Data Finds Its Perfect Home.pdf
Collections in Python - Where Data Finds Its Perfect Home.pdf
 
Building a Search Engine Using Lucene
Building a Search Engine Using LuceneBuilding a Search Engine Using Lucene
Building a Search Engine Using Lucene
 
Lecture1
Lecture1Lecture1
Lecture1
 
Dictionaries and Sets in Python
Dictionaries and Sets in PythonDictionaries and Sets in Python
Dictionaries and Sets in Python
 
Fast track to lucene
Fast track to luceneFast track to lucene
Fast track to lucene
 
ch 13 Dictionaries2.pptx
ch 13 Dictionaries2.pptxch 13 Dictionaries2.pptx
ch 13 Dictionaries2.pptx
 
IR with lucene
IR with luceneIR with lucene
IR with lucene
 
Programming with Python - Week 3
Programming with Python - Week 3Programming with Python - Week 3
Programming with Python - Week 3
 
Programming in Python
Programming in Python Programming in Python
Programming in Python
 
14 Skip Lists
14 Skip Lists14 Skip Lists
14 Skip Lists
 
python full notes data types string and tuple
python full notes data types string and tuplepython full notes data types string and tuple
python full notes data types string and tuple
 
Pa1 session 2
Pa1 session 2 Pa1 session 2
Pa1 session 2
 
Lambdas and Laughs
Lambdas and LaughsLambdas and Laughs
Lambdas and Laughs
 
Python dictionary
Python dictionaryPython dictionary
Python dictionary
 

More from DrRajeshreeKhande

More from DrRajeshreeKhande (20)

.NET F# Inheritance and operator overloading
.NET F# Inheritance and operator overloading.NET F# Inheritance and operator overloading
.NET F# Inheritance and operator overloading
 
Exception Handling in .NET F#
Exception Handling in .NET F#Exception Handling in .NET F#
Exception Handling in .NET F#
 
.NET F# Events
.NET F# Events.NET F# Events
.NET F# Events
 
.NET F# Class constructor
.NET F# Class constructor.NET F# Class constructor
.NET F# Class constructor
 
.NET F# Abstract class interface
.NET F# Abstract class interface.NET F# Abstract class interface
.NET F# Abstract class interface
 
.Net F# Generic class
.Net F# Generic class.Net F# Generic class
.Net F# Generic class
 
F# Console class
F# Console classF# Console class
F# Console class
 
F sharp lists & dictionary
F sharp   lists &  dictionaryF sharp   lists &  dictionary
F sharp lists & dictionary
 
F# array searching
F#  array searchingF#  array searching
F# array searching
 
Net (f#) array
Net (f#)  arrayNet (f#)  array
Net (f#) array
 
.Net (F # ) Records, lists
.Net (F # ) Records, lists.Net (F # ) Records, lists
.Net (F # ) Records, lists
 
MS Office for Beginners
MS Office for BeginnersMS Office for Beginners
MS Office for Beginners
 
Java Multi-threading programming
Java Multi-threading programmingJava Multi-threading programming
Java Multi-threading programming
 
Java String class
Java String classJava String class
Java String class
 
JAVA AWT components
JAVA AWT componentsJAVA AWT components
JAVA AWT components
 
Dr. Rajeshree Khande :Introduction to Java AWT
Dr. Rajeshree Khande :Introduction to Java AWTDr. Rajeshree Khande :Introduction to Java AWT
Dr. Rajeshree Khande :Introduction to Java AWT
 
Dr. Rajeshree Khande Java Interactive input
Dr. Rajeshree Khande Java Interactive inputDr. Rajeshree Khande Java Interactive input
Dr. Rajeshree Khande Java Interactive input
 
Dr. Rajeshree Khande :Intoduction to java
Dr. Rajeshree Khande :Intoduction to javaDr. Rajeshree Khande :Intoduction to java
Dr. Rajeshree Khande :Intoduction to java
 
Java Exceptions Handling
Java Exceptions Handling Java Exceptions Handling
Java Exceptions Handling
 
Dr. Rajeshree Khande : Java Basics
Dr. Rajeshree Khande  : Java BasicsDr. Rajeshree Khande  : Java Basics
Dr. Rajeshree Khande : Java Basics
 

Recently uploaded

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 

Recently uploaded (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 

.net F# mutable dictionay

  • 2. F# - Mutable Dictionary • You know the System.Collections.Generic.Dictionary type from C# or VB .NET. • This acts as a standard lookup collection, allowing fast retrieval of values based on a unique key. • The Dictionary<'TKey, 'TValue> class is the mutable equivalent of the F# map data structure and contains many of the same functions. • a special kind of set that associates the values with key.
  • 3. F# - Mutable Dictionary 1. Creating a dictionary 2. Adding items to the dictionary 3. Removing an item from the dictionary 4. Retrieving an item 5. Trying to access an item that doesn’t exist— exception is raised
  • 4. 1. Creating a Dictionary Created new keyword and calling the constructor open System.Collections.Generic let dict = new Dictionary<string, string>() dict.Add("1", "Ronak") dict.Add("2","Rishita") dict.Add("3","Robin") dict.Add("4","Ruchita") printfn "Dictionary - students: %A" dict Dictionary - students: seq [[1, Ronak]; [2, Rishita]; [3, Robin]; [4, Ruchita]] O/P
  • 5. Properties Comparer used to determine equality of keys for the dictionary. Count Gets the number of key/value pairs Item Gets or sets the value associated with the specified key. Keys Gets a collection containing the keys Values Gets a collection containing the values
  • 6. Example: Properties open System.Collections.Generic let dict = new Dictionary<string, string>() dict.Add("1", "Ronak") dict.Add("2","Rishita") dict.Add("3","Robin") dict.Add("4","Ruchita") printfn "Dictionary - students: %A" dict printfn "Total Number of Students: %d" dict.Count printfn "The keys: %A" dict.Keys printf"The Values: %A" dict.Values
  • 7. Example: Properties-Output Dictionary - students: seq [[1, Ronak]; [2, Rishita]; [3, Robin]; [4, Ruchita]] Total Number of Students: 4 The keys: seq ["1"; "2"; "3"; "4"] The Values: seq ["Ronak"; "Rishita"; "Robin"; "Ruchita"]
  • 8. Methods Add Adds the specified key and value to the dictionary. Clear Removes all keys and values Remove Removes the value with the specified key ContainsKey Determines whether the Dictionary(TKey, TValue) contains the specified key. ContainsValue Determines whether the Dictionary(TKey, TValue) contains a specific value.
  • 9. F# - Mutable Dictionary [<Measure>] type amu type Atom = { Name : string; Weight : float<amu> } open System.Collections.Generic let periodicTable = new Dictionary<string, Atom>() periodicTable.Add( "H", { Name = "Hydrogen"; Weight = 1.0079<amu> }) periodicTable.Add("He", { Name = "Helium"; Weight = 4.0026<amu> }) periodicTable.Add("Li", { Name = "Lithium"; Weight = 6.9410<amu> }) periodicTable.Add("Be", { Name = "Beryllium"; Weight = 9.0122<amu> }) periodicTable.Add( "B", { Name = "Boron "; Weight = 10.811<amu> }) printfn "Dictionary - AMU: %A" periodicTable