Size: a a a

F# Flood: Ручная работа

2020 February 12

VS

Vasily Shapenko in F# Flood: Ручная работа
Поэтому скалисты любят щеголять словом материализация
источник

VS

Vasily Shapenko in F# Flood: Ручная работа
И переписывать графы выполнения
источник

VS

Vasily Shapenko in F# Flood: Ручная работа
call by name такое сильно облегчает
источник

SN

Shub Niggurath in F# Flood: Ручная работа
тут вчера писали, мол если команда понимает, то тогда и дырки в типах - только во благо
источник

SN

Shub Niggurath in F# Flood: Ручная работа
а если команда еще и делает - то можно сразу умирать, потому что это кульминация вашей жизни
источник

SN

Shub Niggurath in F# Flood: Ручная работа
минвайл, ваша команда:
источник

SN

Shub Niggurath in F# Flood: Ручная работа
   [<SuppressMessage("*", "TypeNames")>]
   type posint = private Posint of int
   with
       static member OfInt =
           Constrain.constrain (fun (n : int) ->
               if n > 0
               then Success (Posint n)
               else failf "Expected positive int, received %d" n)
       member this.Value = let (Posint v) = this in v

       // posint & int
       static member (+) (Posint p1, p2 : int) = p1 + p2
       static member (+) (p1 : int, Posint p2) = p1 + p2
       static member (*) (Posint p1, p2 : int) = p1 * p2
       static member (*) (p1 : int, Posint p2) = p1 * p2
       static member (-) (Posint p1, p2 : int) = p1 - p2
       static member (-) (p1 : int, Posint p2) = p1 - p2
       static member (/) (Posint p1, p2 : int) = p1 / p2
       static member (/) (p1 : int, Posint p2) = p1 / p2

       // posint & posint
       static member (+) (Posint p1, Posint p2) = Posint (p1 + p2)
       static member (-) (Posint p1, Posint p2) = p1 - p2
       static member (*) (Posint p1, Posint p2) = Posint (p1 * p2)
       static member (/) (Posint p1, Posint p2) = Posintz (p1 / p2)

       // posint & posintz
       static member (+) (Posint p1, Posintz p2) = Posint (p1 + p2)
       static member (-) (Posint p1, Posintz p2) = p1 - p2
       static member (*) (Posint p1, Posintz p2) = Posintz (p1 * p2)
       static member (/) (Posint p1, Posintz p2) = Posintz (p1 / p2)

       // posint & negint
       static member (+) (Posint p1, Negint p2) = p1 + p2
       static member (-) (Posint p1, Negint p2) = Posint (p1 - p2)
       static member (*) (Posint p1, Negint p2) = Negint (p1 * p2)
       static member (/) (Posint p1, Negint p2) = Negintz (p1 / p2)

       // posint & negintz
       static member (+) (Posint p1, Negintz p2) = p1 + p2
       static member (-) (Posint p1, Negintz p2) = Posint (p1 - p2)
       static member (*) (Posint p1, Negintz p2) = Negintz (p1 * p2)
       static member (/) (Posint p1, Negintz p2) = Negintz (p1 / p2)

   and
       [<SuppressMessage("*", "TypeNames")>]
       posintz = private Posintz of int
   with
       static member OfInt =
           Constrain.constrain (fun (n : int) ->
               if n >= 0
               then Success (Posintz n)
               else failf "Expected non-negative int, received %d" n)
       member this.Value = let (Posintz v) = this in v

       // posintz & int
       static member (+) (Posintz p1, p2 : int) = p1 + p2
       static member (+) (p1 : int, Posintz p2) = p1 + p2
       static member (*) (Posintz p1, p2 : int) = p1 * p2
       static member (*) (p1 : int, Posintz p2) = p1 * p2
       static member (-) (Posintz p1, p2 : int) = p1 - p2
       static member (-) (p1 : int, Posintz p2) = p1 - p2
       static member (/) (Posintz p1, p2 : int) = p1 / p2
       static member (/) (p1 : int, Posintz p2) = p1 / p2

       // posintz & posintz
       static member (+) (Posintz p1, Posintz p2) = Posintz (p1 + p2)
       static member (-) (Posintz p1, Posintz p2) = p1 - p2
       static member (*) (Posintz p1, Posintz p2) = Posintz (p1 * p2)
       static member (/) (Posintz p1, Posintz p2) = Posintz (p1 / p2)

       // posintz & posint
       static member (+) (Posintz p1, Posint p2) = Posint (p1 + p2)
       static member (-) (Posintz p1, Posint p2) = p1 - p2
       static member (*) (Posintz p1, Posint p2) = Posintz (p1 * p2)
       static member (/) (Posintz p1, Posint p2) = Posintz (p1 / p2)

       // posintz & negint
       static member (+) (Posintz p1, Negint p2) = p1 + p2
       static member (-) (Posintz p1, Negint p2) = Posint (p1 - p2)
       static member (*) (Posintz p1, Negint p2) = Negintz (p1 * p2)
       static member (/) (Posintz p1, Negint p2) = Negintz (p1 / p2)
источник

SN

Shub Niggurath in F# Flood: Ручная работа


       // posintz & negintz
       static member (+) (Posintz p1, Negintz p2) = p1 + p2
       static member (-) (Posintz p1, Negintz p2) = Posintz (p1 - p2)
       static member (*) (Posintz p1, Negintz p2) = Negintz (p1 * p2)
       static member (/) (Posintz p1, Negintz p2) = Negintz (p1 / p2)

   and
       [<SuppressMessage("*", "TypeNames")>]
       negint = private Negint of int
   with
       static member OfInt =
           Constrain.constrain (fun (n : int) ->
               if n < 0
               then Success (Negint n)
               else failf "Expected negative int, received %d" n)

       // negint & int
       static member (+) (Negint p1, p2 : int) = p1 + p2
       static member (+) (p1 : int, Negint p2) = p1 + p2
       static member (*) (Negint p1, p2 : int) = p1 * p2
       static member (*) (p1 : int, Negint p2) = p1 * p2
       static member (-) (Negint p1, p2 : int) = p1 - p2
       static member (-) (p1 : int, Negint p2) = p1 - p2
       static member (/) (Negint p1, p2 : int) = p1 / p2
       static member (/) (p1 : int, Negint p2) = p1 / p2

       // negint & negint
       static member (+) (Negint p1, Negint p2) = Negint (p1 + p2)
       static member (-) (Negint p1, Negint p2) = p1 - p2
       static member (*) (Negint p1, Negint p2) = Posint (p1 * p2)
       static member (/) (Negint p1, Negint p2) = Posintz (p1 / p2)

       // negint & posint
       static member (+) (Negint p1, Posint p2) = p1 + p2
       static member (-) (Negint p1, Posint p2) = Negint (p1 - p2)
       static member (*) (Negint p1, Posint p2) = Negint (p1 * p2)
       static member (/) (Negint p1, Posint p2) = Negintz (p1 / p2)

       // negint & posintz
       static member (+) (Negint p1, Posintz p2) = p1 + p2
       static member (-) (Negint p1, Posintz p2) = Negint (p1 - p2)
       static member (*) (Negint p1, Posintz p2) = Negintz (p1 * p2)
       static member (/) (Negint p1, Posintz p2) = Negintz (p1 / p2)

       // negint & negintz
       static member (+) (Negint p1, Negintz p2) = Negint (p1 + p2)
       static member (-) (Negint p1, Negintz p2) = p1 - p2
       static member (*) (Negint p1, Negintz p2) = Posintz (p1 * p2)
       static member (/) (Negint p1, Negintz p2) = Posintz (p1 / p2)

   and
       [<SuppressMessage("*", "TypeNames")>]
       negintz = private Negintz of int
   with
       static member OfInt =
           Constrain.constrain (fun (n : int) ->
               if n <= 0
               then Success (Negintz n)
               else failf "Expected non-positive int, received %d" n)

       // negintz & int
       static member (+) (Negintz p1, p2 : int) = p1 + p2
       static member (+) (p1 : int, Negintz p2) = p1 + p2
       static member (*) (Negintz p1, p2 : int) = p1 * p2
       static member (*) (p1 : int, Negintz p2) = p1 * p2
       static member (-) (Negintz p1, p2 : int) = p1 - p2
       static member (-) (p1 : int, Negintz p2) = p1 - p2
       static member (/) (Negintz p1, p2 : int) = p1 / p2
       static member (/) (p1 : int, Negintz p2) = p1 / p2

       // negintz & negintz
       static member (+) (Negintz p1, Negintz p2) = Negintz (p1 + p2)
       static member (-) (Negintz p1, Negintz p2) = p1 - p2
       static member (*) (Negintz p1, Negintz p2) = Posintz (p1 * p2)
       static member (/) (Negintz p1, Negintz p2) = Posintz (p1 / p2)

       // negintz & posint
       static member (+) (Negintz p1, Posint p2) = p1 + p2
       static member (-) (Negintz p1, Posint p2) = Negint (p1 - p2)
       static member (*) (Negintz p1, Posint p2) = Negintz (p1 * p2)
       static member (/) (Negintz p1, Posint p2) = Negintz (p1 / p2)

       // negintz & posintz
       static member (+) (Negintz p1, Posintz p2) = p1 + p2
       static member (-) (Negintz p1, Posintz p2) = Negintz (p1 - p2)
       static member (*) (Negintz p1, Posintz p2) = Negintz (p1 * p2)
       static member (/) (Negintz p1, Posintz p2) = Negintz (p1 / p2)
источник

SN

Shub Niggurath in F# Flood: Ручная работа


       // negintz & negint
       static member (+) (Negintz p1, Negint p2) = Negint (p1 + p2)
       static member (-) (Negintz p1, Negint p2) = p1 - p2
       static member (*) (Negintz p1, Negint p2) = Posintz (p1 * p2)
       static member (/) (Negintz p1, Negint p2) = Posintz (p1 / p2)

   let posintf = posint.OfInt.Create
   let posint = posint.OfInt.TryCreate
   let posintzf = posintz.OfInt.Create
   let posintz = posintz.OfInt.TryCreate
   let negintf = negint.OfInt.Create
   let negint = negint.OfInt.TryCreate
   let negintzf = negintz.OfInt.Create
   let negintz = negintz.OfInt.TryCreate
источник

ak

aλ>>=ix>=> kononov in F# Flood: Ручная работа
есть же pastebin
источник

ak

aλ>>=ix>=> kononov in F# Flood: Ручная работа
зачем
источник

ak

aλ>>=ix>=> kononov in F# Flood: Ручная работа
источник

SN

Shub Niggurath in F# Flood: Ручная работа
у меня нету
источник

ak

aλ>>=ix>=> kononov in F# Flood: Ручная работа
источник

SN

Shub Niggurath in F# Flood: Ручная работа
The IP/Domain has been blocked due to a known security risk.
источник

ak

aλ>>=ix>=> kononov in F# Flood: Ручная работа
держи
источник

SN

Shub Niggurath in F# Flood: Ручная работа
спасибо
источник

КП

Крылатый Пегас in F# Flood: Ручная работа
Shub Niggurath
The IP/Domain has been blocked due to a known security risk.
источник

VK

Vladislav Khapin in F# Flood: Ручная работа
Shub Niggurath


       // negintz & negint
       static member (+) (Negintz p1, Negint p2) = Negint (p1 + p2)
       static member (-) (Negintz p1, Negint p2) = p1 - p2
       static member (*) (Negintz p1, Negint p2) = Posintz (p1 * p2)
       static member (/) (Negintz p1, Negint p2) = Posintz (p1 / p2)

   let posintf = posint.OfInt.Create
   let posint = posint.OfInt.TryCreate
   let posintzf = posintz.OfInt.Create
   let posintz = posintz.OfInt.TryCreate
   let negintf = negint.OfInt.Create
   let negint = negint.OfInt.TryCreate
   let negintzf = negintz.OfInt.Create
   let negintz = negintz.OfInt.TryCreate
источник

DS

Doge Shibu in F# Flood: Ручная работа
Shub Niggurath
минвайл, ваша команда:
А что значит z на конце второго Posint?
источник