Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
2 answers
113 views

I'm given the following definition of com that sssigns new values to more than one variable in a single command.: Inductive com : Type := | CSkip | CAsgn (xs : list string) (es : list aexp) (* <...
1 vote
1 answer
182 views

while COBOL does support some declarative programming constructs, it is primarily an imperative programming language that is designed to provide low-level control over the machine, and its main focus ...
0 votes
2 answers
661 views

Below is the process I've been using to subscribe and then update a reactive form based on observable data. Maybe there's a way to fix the problem without subscribing to the observable and changing ...
2 votes
2 answers
162 views

In functional programming a statement like if (a || b) can be evaluated in parallel by default, since we don't make any assumptions about the evaluation order due to referential transparency. Is there ...
3 votes
1 answer
2k views

Recently, I was searching for a way to enhance navigating between screens in my Flutter apps. and I found new programming concepts for me (declarative and imperative programming). I need to know more ...
0 votes
1 answer
210 views

Looking for the shortest, most elegant wat to write this. I really like option 2. However, i get this error: Argument of type 'boolean[]' is not assignable to parameter of type 'SetStateAction<...
1 vote
1 answer
612 views

I likely am asking a very stupid question here, please forgive me. I am a Java and C# backend-engineer with relatively good knowledge of OOP design patterns. I have recently discovered the debate ...
1 vote
2 answers
91 views

I'm trying to solve the question that I need to sort a given linked list which values consist of 1, 2 and 0 by traversing the list only once and I need to swap the nodes not values. my code is: #...
user avatar
-1 votes
1 answer
637 views

I just stumbled upon some OCaml code that writes a loop like this: let r = ref (f 0) in for i = 1 to k - 1 do r := f i * !r done ; !r in Which is interesting as I normally see ...
3 votes
1 answer
199 views

There is a sense in which Haskell is a purely functional language, and certainly, idiomatic code tries to be as functional as reasonably possible. At the same time, Haskell does provide support for ...
1 vote
1 answer
181 views

I am currently developing a Duck Hunt-style game with C language for a university class, but I'm having a problem that I can't move the player's aim while keeping the targets moving, for some reason, ...
2 votes
2 answers
2k views

Functional programming insists on telling what to do, rather than how to do. For example,Scala's collections library has methods like filter, map etc. These methods enable developers to get rid of ...
0 votes
2 answers
68 views

I am trying to make a list out of a given array and in my code it returns an empty list. I want to know why this is impossible to do with list. Is it because we are supposed to return something in the ...
1 vote
1 answer
73 views

I came across a problem where I needed to count the number of Strings in an Iterable and store the sums in a Map. I came up with the following imperative solution: private static Map<String, ...
0 votes
1 answer
832 views

I want to generate python code based on UML/SysML. The coding is mainly imperative - calling functions that deliver results, switch states and some main part. How can I create some simple main program,...

15 30 50 per page
1
2 3 4 5
...
10

AltStyle によって変換されたページ (->オリジナル) /