Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about purity

Read more about purity

python (65.2k questions)

javascript (44.3k questions)

reactjs (22.7k questions)

java (20.8k questions)

c# (17.4k questions)

html (16.3k questions)

r (13.7k questions)

android (13k questions)

Questions - purity

How would a functional language actually define/translate primitives to hardware?

Let's say I have a few primitives defined, here using javascript: const TRUE = x => y => x; const FALSE = x => y => y; const ZERO = f => a => a; const ONE = f => a => f(a); con...
test-img

David542

javascript

functional-programming

side-effects

io-monad

purity

Votes: 0

Answers: 1

Latest Answer

A function is pure if its result (the return value) only depends on the inputs you give to it. A language is purely functional if all its functions are pure¹. Therefore it's clear that "utilities...
test-img

Enlico

Can one store a value indexed by a string in the IO monad?

I want to use custom ManagerSettings to build a custom Network.Wreq.Session. I modify from the defaultManagerSettings both managerRawConnection and managerModifyRequest. I want managerModifyRequest to...
test-img

fyusuf-a

haskell

io

purity

Votes: 0

Answers: 1

Latest Answer

I am not familiar with the library, but I guess you need to write something like this: -- pseudocode foo = do -- create the IORef here r <- newIORef "hello" let settings = defaul...
test-img

chi

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved