--
--
To post, send email to fsharp-o...@googlegroups.com
To unsubscribe, send email to
fsharp-opensou...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/fsharp-opensource
---
You received this message because you are subscribed to the Google Groups "F# Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fsharp-opensou...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Personally I think it’s great to see some questions here, so I would continue if I were you, but in terms of other resources: -
- Twitter #fsharp is probably not the best for this, although I’ve done it in conjunction with gists in the past with some success.
- Slack - https://functionalprogramming.slack.com in #fsharp. You might find this useful if you want a bit more of a discussion than an email thread. I think that there’s a Gitter room somewhere as well?
Hey
Just a quick question – I’m assuming from the reference to linqpad that you’re a Windows user, probably using Visual Studio? If so – why use Linqpad over standard .fsx F# scripts? Not criticising you – but genuinely interested if there’s any benefits of using it.
From: Stachu Korick
Sent: 22 September 2015 18:25
To: fsharp-o...@googlegroups.com
Subject: Re: (Forgive me for multiple posts here) pattern matching on empty sets
Personally I love the questions coming in.
I'm getting little bites of F# knowledge throughout my workday, getting me out of the depressing land of OOP.
Please continue so I can escape into sanity throughout the day.
You're my only hope.
Here's my really quick attempt in linqpad.
let (|EmptySet|_|) (set : Set<'T>) =
if set.IsEmpty then Some()
else None
let set1 = new Set<int>([1; 2])
let set2 = new Set<int>([])
let printIfEmpty set =
match set with
| EmptySet -> printfn "yay"
| _ -> ()
printIfEmpty set1
printIfEmpty set2
On Tue, Sep 22, 2015 at 1:17 PM, Thomas Clarke <clar...@gmail.com> wrote:
It sounds to me like you’ve missed out on all the VS integration with F# scripts! You can create a standalone F# script file in Visual Studio (File -> New, it doesn’t even need to be part of a project or solution), with full intellisense in the editor etc. You also then can highlight arbitrary bits of code and send them to FSI directly in Visual Studio and see the results. There’s also the F# Power Tools VS extension which provides refactors and improved colouring etc.
I think you’ll find this a much, much more effective way to write and explore F# than through a console or Linqpad.