![]() ![]() The rec keyword is used together with the let keyword to define a recursive function: let rec fact x = if x 0 Length)Ĭomposition operator > is used to compose functions: let squareNegateThenPrint' = square > negate > print Recursive functions This operator is essential in assisting the F# type checker by providing type information before use: let sumOfLengths ( xs : string ) = xs |> Array. Double-backtick identifiers are handy to improve readability especially in unit testing: let ``square, negate, then print`` x = x |> square |> negate |> print Pipe operator |> is used to chain functions and arguments together. let negate x = x * - 1 let square x = x * x let print x = printfn "The number is: %d " x let squareNegateThenPrint x = print ( negate ( square x)) The let keyword also defines named functions. See Literals (MSDN) for complete reference. Other common examples are F or f for 32-bit floating-point numbers, M or m for decimals, and I for big integers. let b, i, l = 86uy, 86, 86L val b : byte = 86uy val i : int = 86 val l : int64 = 86L Most numeric types have associated suffixes, e.g., uy for unsigned 8-bit integers and L for signed 64-bit integer. let poem = "The lesser world was daubed \n \ By a colorist of modest skill \n \ A master limned you in the finest inks \n \ And with a fresh-cut quill." Basic Types and Literals let tripleXml = """"""īackslash strings indent string contents by stripping leading spaces. let verbatimXml = don't even have to escape " with triple-quoted strings. Use verbatim strings preceded by symbol to avoid escaping control characters (except escaping " by ""). ![]() / Create a string using string concatenation let hello = "Hello" " World" / The `let` keyword defines an (immutable) value let result = 1 1 = 2 Stringsį# string type is an alias for System.String type. ![]() XML doc comments come after /// allowing us to use XML tags to generate documentation. (* This is block comment *) // And this is line comment Line comments start from // and continue until the end of the line. Commentsīlock comments are placed between (* and *). If you have any comments, corrections, or suggested additions, please open an issue or send a pull request to. We suggest checking out this exposure triangle cheat guide for a more in-depth discussion.This cheatsheet glances over some of the common syntax of F# 3.0. The cheat sheet also briefly discusses how the exposure triangle works and the role of the aperture in it. With the greater depth of field from small apertures like f16, you can get as much as of the scene in sharp focus - something that is useful in landscape photography. This means you can use apertures as wide as f1.4 to get a prominent blurring of the background or a pleasant bokeh. The larger the aperture, the shallower the depth of field. In most lenses, the aperture can be as small as f22 or as large as f1.4. The smaller the f-number, the larger the opening. As photography technology progressed, it enabled us to have full control over the f-stop to achieve both proper exposure and creative effects. Also known as the aperture, it’s one of the components that make up the exposure triangle, and refers to the size of the opening that lets light into the camera.Īccording to the guide, the f-stop can be as small as the pinhole of a camera obscura or pinhole camera - the simplest camera there is. The cheat sheet below, which is part of an in-depth guide put together by Cole’s Classroom, covers everything you need to know about f-stop and its role in photography. It may take some time and a lot of practice before you get the hang of it, but today’s featured photography cheat sheet should at least make the learning experience easier. Whether you’re just getting started with photography or have been doing it for some time, let this photography cheat sheet be your comprehensive guide to understanding f-stop.Īperture or f-stop is one of the terms you’ll continuously encounter throughout your photography journey, so understanding how it works is crucial to your practice.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |