Logo

dev-resources.site

for different kinds of informations.

F# For Dummys - Day 4 Value

Published at
5/16/2024
Categories
fsharp
Author
pythonzhu
Categories
1 categories in total
fsharp
open
Author
9 person written this
pythonzhu
open
F# For Dummys - Day 4 Value

Today we learn how to define and store a value

there are different types of value, we introduce 4 of them

  • bool is data type indicate yes or no Image description
let is_this_apple: bool = true
let is_this_orange: bool = false
Enter fullscreen mode Exit fullscreen mode

: bool is type hint, tell compiler type of the variable we define is bool, normally we omit the type hint, as compilerΒ is smart enough to infer the type itself, so we can also define as below

let is_this_apple = true
let is_this_orange = false
Enter fullscreen mode Exit fullscreen mode
  • int is integer Image description
let number_of_people_in_family: int = 5
Enter fullscreen mode Exit fullscreen mode
  • string is a section of text Image description
let dream_of_girl = "have food with grandma in warm place"
Enter fullscreen mode Exit fullscreen mode
  • float and double is decimal, a number with fraction part Image description
let price_of_milk = 1.19
Enter fullscreen mode Exit fullscreen mode
fsharp Article's
30 articles in total
Favicon
Learning some Fantomas AST
Favicon
Ingesting Data in F# with Aether: A Practical Guide to Using Lenses, Prisms, and Morphisms
Favicon
Suicide Boys Merch quality designed shop
Favicon
F# 9: Nullable Reference Types and Advancing Null Safety
Favicon
Unlocking High-Performance AI Computing with F#: A Comprehensive Guide
Favicon
Scope progression
Favicon
How do I register a complaint with Delhivery?
Favicon
New wallpapers every day
Favicon
F# 🀝 GTK4
Favicon
Introducing F# with Semantic Kernel: Simplifying AI App Development with the Pipeline Pattern
Favicon
Describing musical domain with F#
Favicon
Who's Your .NET Ally? - F# vs C#
Favicon
F# For Dummys - Day 13 Collections Array
Favicon
F# For Dummys - Day 12 Collections List
Favicon
Primitive Type Differentiation in F#
Favicon
Request -> Handler -> SubPub Pattern with MediatR or Raw F# code
Favicon
F# For Dummys - Day 11 Collections Tuple
Favicon
F# For Dummys - Day 9 Branching
Favicon
F# For Dummys - Day 8 Function && Pipeline
Favicon
F# For Dummys - Day 7 Operators
Favicon
F# For Dummys - Day 16 Collections Sequence
Favicon
F# For Dummys - Day 15 Collections Set
Favicon
F# For Dummys - Day 14 Collections Map
Favicon
F# For Dummys - Day 10 Loop
Favicon
F# For Dummys - Day 6 Format
Favicon
F# For Dummys - Day 5 Mutable
Favicon
F# For Dummys - Day 4 Value
Favicon
F# For Dummys - Day 3 New Program
Favicon
F# For Dummys - Day 2 Environment
Favicon
F# For Dummys - Day 0 Foreword

Featured ones: